Bmad¶
Core Bmad particle accelerator simulation library.
Classes (Fortran Structures)¶
AcKickerFreqStruct¶
Fortran struct: ac_kicker_freq_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
f |
float | |
amp |
float | |
phi |
float |
AcKickerStruct¶
Fortran struct: ac_kicker_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
amp_vs_time |
1D array of AcKickerTimeStruct | |
frequency |
1D array of AcKickerFreqStruct |
AcKickerTimeStruct¶
Fortran struct: ac_kicker_time_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
amp |
float | |
time |
float | |
spline |
SplineStruct |
AnormalModeStruct¶
Fortran struct: anormal_mode_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
emittance |
float | Beam emittance (unnormalized). Includes vertical photon opening angle. |
emittance_no_vert |
float | Unnormalized beam emittance without the vertical photon opening angle taken into account. |
synch_int |
1D array of float (shape: 4:6) | Synchrotron integrals |
j_damp |
float | damping partition number |
alpha_damp |
float | damping per turn |
chrom |
float | Chromaticity |
tune |
float | "Fractional" tune in radians |
ApertureParamStruct¶
Fortran struct: aperture_param_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
min_angle |
float | |
max_angle |
float | |
n_angle |
int | |
n_turn |
int | Number of turns a particle must survive. |
x_init |
float | Initial x coordinate to start with for theta_xy = 0. |
y_init |
float | Initial y coordinate to start with for theta_xy = pi/2. |
rel_accuracy |
float | Relative resolution of bracketed aperture. |
abs_accuracy |
float | Absolute resolution of bracketed aperture (meters). |
start_ele |
str | Element to start tracking at. |
AperturePointStruct¶
Fortran struct: aperture_point_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x |
float | (x,y) aperture point with respect to the reference orbit. |
y |
float | (x,y) aperture point with respect to the reference orbit. |
plane |
int | plane determining loss |
ix_ele |
int | ele index particle lost at |
i_turn |
int | turn particle lost at |
ApertureScanStruct¶
Fortran struct: aperture_scan_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
point |
1D array of AperturePointStruct | Set of aperture points at different angles. |
ref_orb |
CoordStruct | Ref orbit around which the scan is made. |
pz_start |
float | Starting pz. |
BeamInitStruct¶
Fortran struct: beam_init_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
position_file |
str | File with particle positions. |
distribution_type |
1D array of str (shape: 3) | distribution type (in x-px, y-py, and z-pz planes) "ELLIPSE", "KV", "GRID", "FILE", "RAN_GAUSS" or "" = "RAN_GAUSS" |
spin |
1D array of float (shape: 3) | Spin (x, y, z) |
ellipse |
1D array of EllipseBeamInitStruct (shape: 3) | Ellipse beam distribution |
KV |
KvBeamInitStruct | KV beam distribution |
grid |
1D array of GridBeamInitStruct (shape: 3) | Grid beam distribution |
center_jitter |
1D array of float (shape: 6) | Bunch center rms jitter |
emit_jitter |
1D array of float (shape: 2) | a and b bunch emittance rms jitter normalized to emittance |
sig_z_jitter |
float | bunch length RMS jitter |
sig_pz_jitter |
float | RMS pz spread jitter |
n_particle |
int | Number of particles per bunch. |
renorm_center |
bool | Renormalize centroid? |
renorm_sigma |
bool | Renormalize sigma? |
random_engine |
str | Or 'quasi'. Random number engine to use. |
random_gauss_converter |
str | Or 'quick' or 'exact'. Uniform to gauss conversion method. |
random_sigma_cutoff |
float | Cut-off in sigmas. |
a_norm_emit |
float | a-mode normalized emittance (emit * beta * gamma) |
b_norm_emit |
float | b-mode normalized emittance (emit * beta * gamma) |
a_emit |
float | a-mode emittance |
b_emit |
float | b-mode emittance |
dPz_dz |
float | Correlation of Pz with long position. |
center |
1D array of float (shape: 6) | Bench phase space center offset relative to reference. |
t_offset |
float | Time center offset |
dt_bunch |
float | Time between bunches. |
sig_z |
float | Z sigma in m. |
sig_pz |
float | pz sigma |
bunch_charge |
float | charge (Coul) in a bunch. |
n_bunch |
int | Number of bunches. |
ix_turn |
int | Turn index used to adjust particles time if needed. |
species |
str | "positron", etc. "" => use referece particle. |
full_6D_coupling_calc |
bool | Use V from 6x6 1-turn mat to match distribution? Else use 4x4 1-turn mat used. |
use_particle_start |
bool | Use lat%particle_start instead of beam_init%center, %t_offset, and %spin? |
use_t_coords |
bool | If true, the distributions will be taken as in t-coordinates |
use_z_as_t |
bool | Only used if use_t_coords = .true. If true, z describes the t distribution If false, z describes the s distribution |
file_name |
str | OLD!! DO NOT USE!! |
BeamStruct¶
Fortran struct: beam_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
bunch |
1D array of BunchStruct |
BmadCommonStruct¶
Fortran struct: bmad_common_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
max_aperture_limit |
float | Max Aperture. |
d_orb |
1D array of float (shape: 6) | Orbit deltas for the mat6 via tracking calc. |
default_ds_step |
float | Default integration step for eles without an explicit step calc. |
significant_length |
float | meter |
rel_tol_tracking |
float | Closed orbit relative tolerance. |
abs_tol_tracking |
float | Closed orbit absolute tolerance. |
rel_tol_adaptive_tracking |
float | Runge-Kutta tracking relative tolerance. |
abs_tol_adaptive_tracking |
float | Runge-Kutta tracking absolute tolerance. |
init_ds_adaptive_tracking |
float | Initial step size |
min_ds_adaptive_tracking |
float | Min step size to take. |
fatal_ds_adaptive_tracking |
float | If actual step size is below this particle is lost. |
autoscale_amp_abs_tol |
float | Autoscale absolute amplitude tolerance (eV). |
autoscale_amp_rel_tol |
float | Autoscale relative amplitude tolerance |
autoscale_phase_tol |
float | Autoscale phase tolerance. |
electric_dipole_moment |
float | Particle's EDM. Call set_ptc to transfer value to PTC. |
synch_rad_scale |
float | Synch radiation kick scale. 1 => normal, 0 => no kicks. |
sad_eps_scale |
float | Used in sad_mult step length calc. |
sad_amp_max |
float | Used in sad_mult step length calc. |
sad_n_div_max |
int | Used in sad_mult step length calc. |
taylor_order |
int | Taylor order to use. 0 -> default = ptc_private%taylor_order_saved. |
runge_kutta_order |
int | Runge Kutta order. |
default_integ_order |
int | PTC integration order. |
max_num_runge_kutta_step |
int | Maximum number of RK steps before particle is considered lost. |
rf_phase_below_transition_ref |
bool | Autoscale uses below transition stable point for RFCavities? |
sr_wakes_on |
bool | Short range wakefields? |
lr_wakes_on |
bool | Long range wakefields |
auto_bookkeeper |
bool | Deprecated and no longer used. |
high_energy_space_charge_on |
bool | High energy space charge effect switch. |
high_energy_space_charge_linear |
bool | High energy space charge effect switch. |
csr_and_space_charge_on |
bool | Space charge switch. |
spin_tracking_on |
bool | spin tracking? |
spin_sokolov_ternov_flipping_on |
bool | Spin flipping during synchrotron radiation emission? |
radiation_damping_on |
bool | Radiation damping toggle. |
radiation_zero_average |
bool | Shift damping to be zero on the zero orbit to get rid of sawtooth? |
radiation_fluctuations_on |
bool | Radiation fluctuations toggle. |
conserve_taylor_maps |
bool | Enable bookkeeper to set ele%taylor_map_includes_offsets = F? |
absolute_time_tracking |
bool | Absolute or relative time tracking? |
absolute_time_ref_shift |
bool | Apply reference time shift when using absolute time tracking? |
convert_to_kinetic_momentum |
bool | Cancel kicks due to finite vector potential when doing symplectic tracking? Set to True to test symp_lie_bmad against runge_kutta. |
normalize_twiss |
bool | Normalize matrix when computing Twiss for off-energy ref? |
aperture_limit_on |
bool | Use apertures in tracking? |
spin_n0_direction_user_set |
bool | User sets direction of n0 for closed geometry branches? |
debug |
bool | Used for code debugging. |
BmadNormalFormStruct¶
Fortran struct: bmad_normal_form_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ele_origin |
EleStruct | Element at which the on-turn map was created. |
M |
1D array of TaylorStruct (shape: 6) | One-turn taylor map: M = A o N o A_inv, N = exp(:h:) |
A |
1D array of TaylorStruct (shape: 6) | Map from Floquet -> Lab coordinates |
A_inv |
1D array of TaylorStruct (shape: 6) | Map from Lab -> Floquet coordinates |
dhdj |
1D array of TaylorStruct (shape: 6) | Nonlinear tune function operating on Floquet coordinates |
F |
1D array of ComplexTaylorStruct (shape: 6) | Vector field factorization in phasor basis: |
L |
1D array of ComplexTaylorStruct (shape: 6) | L component |
h |
1D array of ResonanceHStruct |
BookkeepingStateStruct¶
Fortran struct: bookkeeping_state_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
attributes |
int | Element dependent attributes: super_ok\(, ok\) or stale$ |
control |
int | Lord/slave bookkeeping status: super_ok\(, ok\) or stale$ |
floor_position |
int | Global (floor) geometry: super_ok\(, ok\) or stale$ |
s_position |
int | Longitudinal position & element length: super_ok\(, ok\) or stale$ |
ref_energy |
int | Reference energy and ref time: super_ok\(, ok\) or stale$ |
mat6 |
int | Linear transfer map status: super_ok\(, ok\) or stale$ |
rad_int |
int | Radiation integrals cache status |
ptc |
int | Associated PTC fibre (or layout) status. |
has_misalign |
bool | Used to avoid unnecessary calls to offset_particle. |
BpmPhaseCouplingStruct¶
Fortran struct: bpm_phase_coupling_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
K_22a |
float | In-phase y/x for a-mode oscillations. |
K_12a |
float | Out-of-phase y/x for a-mode oscillations. |
K_11b |
float | In-phase x/y for b-mode oscillations. |
K_12b |
float | Out-of-phase x/y for b-mode oscillations. |
Cbar22_a |
float | Cbar22 as calculated from K_22a. |
Cbar12_a |
float | Cbar12 as calculated from K_12a. |
Cbar11_b |
float | Cbar11 as calculated from K_11b. |
Cbar12_b |
float | Cbar12 as calculated from K_12b. |
phi_a |
float | a-mode betatron phase. |
phi_b |
float | b-mode betatron phase. |
BranchStruct¶
Fortran struct: branch_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | Name of line that defines the branch. |
ix_branch |
int | Index of this branch. 0 => Main branch |
ix_from_branch |
int | -1 => No creating fork element to this branch. |
ix_from_ele |
int | Index of creating fork element which forks to this branch. |
ix_to_ele |
int | Index of element in this branch that creating fork element forks to. |
ix_fixer |
int | Index of active fixer or beginning_ele element. |
n_ele_track |
int | |
n_ele_max |
int | |
lat |
LatStruct | |
a |
ModeInfoStruct | Note: Tunes are the fractional part. |
b |
ModeInfoStruct | Note: Tunes are the fractional part. |
z |
ModeInfoStruct | Note: Tunes are the fractional part. |
ele |
1D array of EleStruct | |
param |
LatParamStruct | |
particle_start |
CoordStruct | |
wall3d |
1D array of Wall3dStruct |
BunchParamsStruct¶
Fortran struct: bunch_params_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
centroid |
CoordStruct | Lab frame |
x |
TwissStruct | Projected Twiss parameters |
y |
TwissStruct | Projected Twiss parameters |
z |
TwissStruct | Projected Twiss parameters |
a |
TwissStruct | Normal mode twiss parameters |
b |
TwissStruct | Normal mode twiss parameters |
c |
TwissStruct | Normal mode twiss parameters |
sigma |
2D array of float (shape: 6,6) | beam size matrix |
rel_max |
1D array of float (shape: 7) | Max orbit relative to centroid. 7 -> time. |
rel_min |
1D array of float (shape: 7) | Min orbit relative to_centroid. 7 -> time. |
s |
float | Longitudinal position. |
t |
float | Time. |
sigma_t |
float | RMS of time spread. |
charge_live |
float | Charge of all non-lost particle |
charge_tot |
float | Charge of all particles. |
n_particle_tot |
int | Total number of particles |
n_particle_live |
int | Number of non-lost particles |
n_particle_lost_in_ele |
int | Number lost in element (not calculated by Bmad) |
n_good_steps |
int | Number of good steps (set when tracking with space charge) |
n_bad_steps |
int | Number of bad steps (set when tracking with space charge) |
ix_ele |
int | Lattice element where params evaluated at. |
location |
int | Location in element: upstream_end\(, inside\), or downstream_end$ |
twiss_valid |
bool | Is the data here valid? Note: IF there is no energy variation (RF off) twiss_valid may be true but in this case the z-twiss will not be valid. |
BunchStruct¶
Fortran struct: bunch_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
particle |
1D array of CoordStruct | |
ix_z |
1D array of int | bunch%ix_z(1) is index of head particle, etc. |
charge_tot |
float | Total charge in a bunch (Coul). |
charge_live |
float | Charge of live particles (Coul). |
z_center |
float | Longitudinal center of bunch at creation time. Note: Generally, z_center of bunch #1 is 0 and z_center of the other bunches is negative. |
t_center |
float | Center of bunch at creation time relative to head bunch. |
t0 |
float | Used by track1_bunch_space_charge for tracking so particles have constant t. |
drift_between_t_and_s |
bool | Drift (ignore any fields) instead of tracking to speed up the calculation? This can only be done under certain circumstances. |
ix_ele |
int | Nominal element bunch is at. But, EG, dead particles can be someplace else. |
ix_bunch |
int | Bunch index. Head bunch = 1, etc. |
ix_turn |
int | Turn index for long term tracking. ix_turn = 0 before end of first turn, etc. |
n_live |
int | |
n_good |
int | Number of accepted steps when using adaptive step size control. |
n_bad |
int | Number of rejected steps when using adaptive step size control. |
BunchTrackStruct¶
Fortran struct: bunch_track_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
pt |
1D array of BunchParamsStruct | Array indexed from 0 |
ds_save |
float | Min distance between points. |
n_pt |
int | Track upper bound |
CartesianMapStruct¶
Fortran struct: cartesian_map_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
field_scale |
float | Factor to scale the fields by |
r0 |
1D array of float (shape: 3) | Field origin offset. |
master_parameter |
int | Master parameter in ele%value(:) array to use for scaling the field. |
ele_anchor_pt |
int | anchor_beginning\(, anchor_center\), or anchor_end$ |
field_type |
int | or electric$ |
ptr |
CartesianMapTermStruct |
CartesianMapTerm1Struct¶
Fortran struct: cartesian_map_term1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
float | |
kx |
float | |
ky |
float | |
kz |
float | |
x0 |
float | |
y0 |
float | |
phi_z |
float | |
family |
int | family_x$, etc. |
form |
int | hyper_y$, etc. |
CartesianMapTermStruct¶
Fortran struct: cartesian_map_term_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | Input file name. Used also as ID for instances. |
n_link |
int | For memory management of %term |
term |
1D array of CartesianMapTerm1Struct |
ComplexTaylorStruct¶
Fortran struct: complex_taylor_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ref |
complex | |
term |
1D array of ComplexTaylorTermStruct |
ComplexTaylorTermStruct¶
Fortran struct: complex_taylor_term_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
complex | |
expn |
1D array of int (shape: 6) |
ControlRamp1Struct¶
Fortran struct: control_ramp1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
y_knot |
1D array of float | |
stack |
1D array of ExpressionAtomStruct | Evaluation stack |
attribute |
str | Name of attribute controlled. Set to "FIELD_OVERLAPS" for field overlaps. |
slave_name |
str | Name of slave. |
is_controller |
bool | Is the slave a controller? If so bookkeeping is different. |
ControlStruct¶
Fortran struct: control_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
value |
float | Used by group, and overlay elements. |
y_knot |
1D array of float | |
stack |
1D array of ExpressionAtomStruct | Evaluation stack |
slave |
LatEleLocStruct | |
lord |
LatEleLocStruct | |
slave_name |
str | Name of slave. |
attribute |
str | Name of attribute controlled. Set to "FIELD_OVERLAPS" for field overlaps. Set to "INPUT" or "OUTPUT" for feedback slaves. |
ix_attrib |
int | Index of attribute controlled. See note above! |
ControlVar1Struct¶
Fortran struct: control_var1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | |
value |
float | |
old_value |
float |
ControllerStruct¶
Fortran struct: controller_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
var |
1D array of ControlVar1Struct | |
ramp |
1D array of ControlRamp1Struct | For ramper lord elements |
ramper_lord |
1D array of RamperLordStruct | Ramper lord info for this slave |
x_knot |
1D array of float |
CoordArrayStruct¶
Fortran struct: coord_array_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
orbit |
1D array of CoordStruct |
CoordStruct¶
Fortran struct: coord_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
vec |
1D array of float (shape: 6) | (x, px, y, py, z, pz). Generally phase space for charged particles. See Bmad manual. |
s |
float | Longitudinal position |
t |
float | Absolute time (not relative to reference). Note: Quad precision! |
spin |
1D array of float (shape: 3) | Spin. |
field |
1D array of float (shape: 2) | Photon E-field intensity (x,y). |
phase |
1D array of float (shape: 2) | Photon E-field phase (x,y). For charged particles, phase(1) is RF phase. |
charge |
float | Macroparticle weight (which is different from particle species charge). For some space charge calcs the weight is in Coulombs. |
dt_ref |
float | Used in: * time tracking for computing z. * by coherent photons = path_length/c_light. |
r |
float | For general use. Not used by Bmad. |
p0c |
float | For non-photons: Reference momentum. For photons: Photon momentum (not reference). |
E_potential |
float | Potential energy. |
beta |
float | Velocity / c_light. |
ix_ele |
int | Index of the lattice element the particle is in. May be -1 if element is not associated with a lattice. |
ix_branch |
int | Index of the lattice branch the particle is in. |
ix_turn |
int | Turn index for multiturn tracking. |
ix_user |
int | For general use, not used by Bmad. |
state |
int | alive\(, lost\), lost_neg_x_aperture\(, lost_pz\), etc. |
direction |
int | +1 or -1. Sign of longitudinal direction of motion (ds/dt). This is independent of the element orientation. |
time_dir |
int | +1 or -1. Time direction. -1 => Traveling backwards in time. |
species |
int | positron\(, proton\), etc. |
location |
int | upstream_end\(, inside\), or downstream_end$ |
CylindricalMapStruct¶
Fortran struct: cylindrical_map_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
m |
int | Azimuthal Mode: varies as cos(m*phi - theta0_azimuth) |
harmonic |
int | Harmonic of fundamental |
phi0_fieldmap |
float | Mode oscillates as: twopi * (f * t + phi0_fieldmap) |
theta0_azimuth |
float | Azimuthal ((x, y) plane) orientation of mode. |
field_scale |
float | Factor to scale the fields by |
master_parameter |
int | Master parameter in ele%value(:) array to use for scaling the field. |
ele_anchor_pt |
int | anchor_beginning\(, anchor_center\), or anchor_end$ |
dz |
float | Distance between sampled field points. |
r0 |
1D array of float (shape: 3) | Field origin offset. |
ptr |
CylindricalMapTermStruct |
CylindricalMapTerm1Struct¶
Fortran struct: cylindrical_map_term1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
e_coef |
complex | |
b_coef |
complex |
CylindricalMapTermStruct¶
Fortran struct: cylindrical_map_term_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | Input file name. Used also as ID for instances. |
n_link |
int | For memory management of this structure |
term |
1D array of CylindricalMapTerm1Struct |
ElePointerStruct¶
Fortran struct: ele_pointer_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ele |
EleStruct | |
loc |
LatEleLocStruct | |
id |
int | For general use. Not used by Bmad. In particular, used by Tao to designate universe ele is in. |
EleStruct¶
Fortran struct: ele_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | name of element. |
type |
str | type name. |
alias |
str | Another name. |
component_name |
str | Used by overlays, multipass patch, etc. |
descrip |
str | Description string. |
a |
TwissStruct | Twiss parameters at end of element |
b |
TwissStruct | Twiss parameters at end of element |
z |
TwissStruct | Twiss parameters at end of element |
x |
XyDispStruct | Projected dispersions. |
y |
XyDispStruct | Projected dispersions. |
ac_kick |
AcKickerStruct | ac_kicker element parameters. |
bookkeeping_state |
BookkeepingStateStruct | Attribute bookkeeping |
branch |
BranchStruct | Pointer to branch containing element. |
control |
ControllerStruct | group & overlay variables. |
rf |
RfEleStruct | RF parameters. |
lord |
EleStruct | Pointer to a slice lord. |
ptc_fibre |
Fibre | PTC track corresponding to this ele. %floor is floor coord of lab coordinates at the downstream end. Notice that if ele%direction = -1, the lab coords have the z-axis antiparallel to the +s-direction. |
floor |
FloorPositionStruct | |
high_energy_space_charge |
HighEnergySpaceChargeStruct | |
mode3 |
Mode3Struct | 6D normal mode structure. |
photon |
PhotonElementStruct | |
rad_map |
RadMapEleStruct | Radiation kick parameters Note: The reference orbits for spin and orbit Taylor maps are not necessarily the same. For example, Sprint spin Taylor maps can be with respect to the zero orbit independent of the orbital map. |
taylor |
1D array of TaylorStruct (shape: 6) | Phase space Taylor map. |
spin_taylor_ref_orb_in |
1D array of float (shape: 6) | |
spin_taylor |
1D array of TaylorStruct (shape: 0:3) | Quaternion Spin Taylor map. |
wake |
WakeStruct | Wakes |
wall3d |
1D array of Wall3dStruct | Chamber or capillary wall E/M field structs. |
cartesian_map |
1D array of CartesianMapStruct | Used to define E/M fields |
cylindrical_map |
1D array of CylindricalMapStruct | Used to define E/M fields |
gen_grad_map |
1D array of GenGradMapStruct | Used to define E/M fields. |
grid_field |
1D array of GridFieldStruct | Used to define E/M fields. The difference between map_ref_orb and time_ref_orb is that map_ref_orb is the reference orbit for the 1st order spin/orbit map which, in general, is non-zero while time_ref_orb follows the reference particle which is generally the zero orbit (non-zero, for example, in the second slice of a sliced wiggler). |
map_ref_orb_in |
CoordStruct | Entrance end transfer map ref orbit |
map_ref_orb_out |
CoordStruct | Exit end transfer map ref orbit |
time_ref_orb_in |
CoordStruct | Reference orbit at entrance end for ref_time calc. |
time_ref_orb_out |
CoordStruct | Reference orbit at exit end for ref_time calc. |
value |
1D array of float (shape: num_ele_attrib$) | attribute values. |
old_value |
1D array of float (shape: num_ele_attrib$) | Used to see if %value(:) array has changed. Note: The reference orbit for spin/orbit matrices is %map_ref_orb_in/out |
spin_q |
2D array of float (shape: 0:3,0:6) | 0th and 1st order Spin transport quaternion. |
vec0 |
1D array of float (shape: 6) | 0th order transport vector. |
mat6 |
2D array of float (shape: 6,6) | 1st order transport matrix. |
c_mat |
2D array of float (shape: 2,2) | 2x2 C coupling matrix |
dc_mat_dpz |
2D array of float (shape: 2,2) | d(c_mat)/dpz variation. |
gamma_c |
float | gamma associated with C matrix |
s_start |
float | longitudinal ref position at entrance_end |
s |
float | longitudinal ref position at the exit end. |
ref_time |
float | Time ref particle passes exit end. |
a_pole |
1D array of float | knl for multipole elements. |
b_pole |
1D array of float | tilt for multipole elements. |
a_pole_elec |
1D array of float | Electrostatic multipoles. ksnl for multipole elements. |
b_pole_elec |
1D array of float | Electrostatic multipoles. |
custom |
1D array of float | Custom attributes. |
r |
3D array of float | For general use. Not used by Bmad. |
key |
int | Element class (quadrupole, etc.). |
sub_key |
int | Records bend input type. |
ix_ele |
int | Index in branch ele(0:) array. Set to ix_slice_slave$ = -2 for slice_slave$ elements. |
ix_branch |
int | Index in lat%branch(:) array. Note: lat%ele => lat%branch(0). |
lord_status |
int | Type of lord element this is. overlay_lord$, etc. |
n_slave |
int | Number of slaves (except field overlap slaves) of this element. |
n_slave_field |
int | Number of field slaves of this element. |
ix1_slave |
int | Pointer index to this element's slaves. |
slave_status |
int | Type of slave element this is. multipass_slave\(, slice_slave\), etc. |
n_lord |
int | Number of lords (except field overlap and ramper lords). |
n_lord_field |
int | Number of field lords of this element. |
n_lord_ramper |
int | Number of ramper lords. |
ic1_lord |
int | Pointer index to this element's lords. |
ix_pointer |
int | For general use. Not used by Bmad. |
ixx |
int | Index for Bmad internal use. |
iyy |
int | Index for Bmad internal use. |
izz |
int | Index for Bmad internal use. |
mat6_calc_method |
int | taylor\(, symp_lie_ptc\), etc. |
tracking_method |
int | taylor\(, linear\), etc. |
spin_tracking_method |
int | symp_lie_ptc$, etc. |
csr_method |
int | or one_dim$ ("1_dim"), steady_state_3d$ |
space_charge_method |
int | slice\(, slice_longitudinal\), slice_transverse\(, fft_3D\), cathode_fft_3d$ |
ptc_integration_type |
int | drift_kick\(, matrix_kick\), or ripken_kick$ |
field_calc |
int | no_field\(, fieldmap\), refer_to_lords\(, or custom\) |
aperture_at |
int | Aperture location: entrance_end$, ... |
aperture_type |
int | rectangular\(, elliptical\), auto_aperture$, ... |
ref_species |
int | Reference species |
orientation |
int | -1 -> Element is longitudinally reversed. +1 -> Normal. |
symplectify |
bool | Symplectify mat6 matrices. |
mode_flip |
bool | Have the normal modes traded places? |
multipoles_on |
bool | For turning multipoles on/off |
scale_multipoles |
bool | Are ab_multipoles within other elements (EG: quads, etc.) scaled by the strength of the element? |
taylor_map_includes_offsets |
bool | Taylor map calculated with element misalignments? |
field_master |
bool | Calculate strength from the field value? |
is_on |
bool | For turning element on/off. |
logic |
bool | For general use. Not used by Bmad (except during lattice parsing). |
bmad_logic |
bool | For Bmad internal use only. |
select |
bool | For Bmad internal use only. |
offset_moves_aperture |
bool | element offsets affects aperture? ! final :: ele_finalizer |
EllipseBeamInitStruct¶
Fortran struct: ellipse_beam_init_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
part_per_ellipse |
int | number of particles per ellipse |
n_ellipse |
int | number of ellipses (>= 1) |
sigma_cutoff |
float | sigma cutoff of the representation |
EmFieldStruct¶
Fortran struct: em_field_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
E |
1D array of float (shape: 3) | electric field. |
B |
1D array of float (shape: 3) | magnetic field. |
dE |
2D array of float (shape: 3,3) | electric field gradient. |
dB |
2D array of float (shape: 3,3) | magnetic field gradient. |
phi |
float | Electric scalar potential. |
phi_B |
float | Magnetic scalar potential. |
A |
1D array of float (shape: 3) | Magnetic vector potential. |
ExpressionAtomStruct¶
Fortran struct: expression_atom_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | |
type |
int | plus\(, minum\), sin\(, cos\), etc. To convert to string use: expression_op_name |
value |
float |
ExpressionTreeStruct¶
Fortran struct: expression_tree_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | |
type |
int | plus\(, minum\), sin\(, cos\), etc. |
value |
float | |
node |
1D array of ExpressionTreeStruct | Child nodes. Note: Pointer used here since Ifort does not support allocatable. |
FloorPositionStruct¶
Fortran struct: floor_position_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
r |
1D array of float (shape: 3) | (x, y, z) offset from origin |
w |
2D array of float (shape: 3,3) | W matrix. Columns are unit vectors of the frame axes. |
theta |
float | angular orientation consistent with W matrix |
phi |
float | angular orientation consistent with W matrix |
psi |
float | angular orientation consistent with W matrix |
GenGrad1Struct¶
Fortran struct: gen_grad1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
m |
int | Azimuthal index |
sincos |
int | sin$ or cos$ |
n_deriv_max |
int | Max GG derivative The derivative matrix is extended to include the interpolating spline polynomial. |
deriv |
2D array of float | Range: (iz0:iz1, 0:2*n_deriv_max+1) |
GenGradMapStruct¶
Fortran struct: gen_grad_map_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | Input file name. Used also as ID for instances. |
gg |
1D array of GenGrad1Struct | |
ele_anchor_pt |
int | anchor_beginning\(, anchor_center\), or anchor_end$ |
field_type |
int | or electric$ |
iz0 |
int | gg%deriv(iz0:iz1, :) lower bound. |
iz1 |
int | gg%deriv(iz0:iz1, :) upper bound. |
dz |
float | Point spacing. |
r0 |
1D array of float (shape: 3) | field origin relative to ele_anchor_pt. |
field_scale |
float | Factor to scale the fields by |
master_parameter |
int | Master parameter in ele%value(:) array to use for scaling the field. |
curved_ref_frame |
bool |
GgTaylorStruct¶
Fortran struct: gg_taylor_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ref |
float | |
term |
1D array of GgTaylorTermStruct |
GgTaylorTermStruct¶
Fortran struct: gg_taylor_term_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
float | |
expn |
1D array of int (shape: 2) |
GridBeamInitStruct¶
Fortran struct: grid_beam_init_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
n_x |
int | Number of columns. |
n_px |
int | Number of rows. |
x_min |
float | Lower x limit. |
x_max |
float | Upper x limit. |
px_min |
float | Lower px limit. |
px_max |
float | Upper px limit. |
GridFieldPt1Struct¶
Fortran struct: grid_field_pt1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
E |
1D array of complex (shape: 3) | |
B |
1D array of complex (shape: 3) |
GridFieldPtStruct¶
Fortran struct: grid_field_pt_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | Input file name. Used also as ID for instances. |
n_link |
int | For memory management of this structure |
pt |
3D array of GridFieldPt1Struct |
GridFieldStruct¶
Fortran struct: grid_field_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
geometry |
int | Type of grid: xyz\(, or rotationally_symmetric_rz\) |
harmonic |
int | Harmonic of fundamental for AC fields. |
phi0_fieldmap |
float | Mode oscillates as: twopi * (f * t + phi0_fieldmap) |
field_scale |
float | Factor to scale the fields by |
field_type |
int | or magnetic$ or electric$ |
master_parameter |
int | Master parameter in ele%value(:) array to use for scaling the field. |
ele_anchor_pt |
int | anchor_beginning\(, anchor_center\), or anchor_end$ |
interpolation_order |
int | Possibilities are 1 or 3. |
dr |
1D array of float (shape: 3) | Grid spacing. |
r0 |
1D array of float (shape: 3) | Field origin relative to ele_anchor_pt. |
curved_ref_frame |
bool | |
ptr |
GridFieldPtStruct | |
bi_coef |
3D array of BicubicCmplxCoefStruct (shape: 4, 2, 3) | Save computed coefs for faster tracking |
tri_coef |
3D array of TricubicCmplxCoefStruct (shape: 4, 2, 3) | Save computed coefs for faster tracking |
HighEnergySpaceChargeStruct¶
Fortran struct: high_energy_space_charge_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
closed_orb |
CoordStruct | beam orbit |
kick_const |
float | |
sig_x |
float | |
sig_y |
float | |
phi |
float | Rotation angle to go from lab frame to rotated frame. |
sin_phi |
float | |
cos_phi |
float | |
sig_z |
float |
Interval1CoefStruct¶
Fortran struct: interval1_coef_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
c0 |
float | |
c1 |
float | |
n_exp |
float |
KvBeamInitStruct¶
Fortran struct: kv_beam_init_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
part_per_phi |
1D array of int (shape: 2) | number of particles per angle variable. |
n_I2 |
int | number of I2 |
A |
float | A = I1/e |
LatEleLocStruct¶
Fortran struct: lat_ele_loc_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ix_ele |
int | |
ix_branch |
int |
LatEleOrder1Struct¶
Fortran struct: lat_ele_order1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ix_branch |
int | Branch index |
ix_order |
int | Order index. -1 -> Unique in lattice, 0 -> unique in branch. |
LatEleOrderArrayStruct¶
Fortran struct: lat_ele_order_array_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ele |
1D array of LatEleOrder1Struct |
LatEleOrderStruct¶
Fortran struct: lat_ele_order_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
branch |
1D array of LatEleOrderArrayStruct |
LatParamStruct¶
Fortran struct: lat_param_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
n_part |
float | Particles/bunch (for BeamBeam elements). |
total_length |
float | total_length of branch. Warning: branch may not start at s = 0. |
unstable_factor |
float | If positive: Growth rate/turn if unstable in closed branches or |orbit-aperture|/aperture if particle hits wall. Zero otherwise. |
t1_with_RF |
2D array of float (shape: 6,6) | Full 1-turn matrix with RF on. |
t1_no_RF |
2D array of float (shape: 6,6) | Full 1-turn matrix with RF off. |
spin_tune |
float | Closed orbit spin tune. |
particle |
int | Reference particle: positron\(, electron\), etc. Call lattice_bookkeeper if this is changed. |
default_tracking_species |
int | Default particle type to use in tracking. |
geometry |
int | open$ or closed$ |
ixx |
int | Integer for general use |
stable |
bool | is closed lat stable? |
live_branch |
bool | Should tracking be done on the branch? |
g1_integral |
float | Approximate |g| (bending strength) integral of branch. |
g2_integral |
float | Approximate g^2 integral of branch. |
g3_integral |
float | Approximate g^2 integral of branch. |
bookkeeping_state |
BookkeepingStateStruct | Overall status for the branch. |
beam_init |
BeamInitStruct | For beam initialization. |
LatStruct¶
Fortran struct: lat_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
use_name |
str | Name of lat given by USE statement |
lattice |
str | Lattice |
machine |
str | Name of the machine the lattice is for ("LHC", etc). |
input_file_name |
str | Name of the lattice input file |
title |
str | General title |
print_str |
1D array of str | Saved print statements. |
constant |
1D array of ExpressionAtomStruct | Constants defined in the lattice |
a |
ModeInfoStruct | Tunes (fractional part), etc. |
b |
ModeInfoStruct | Tunes (fractional part), etc. |
z |
ModeInfoStruct | Tunes (fractional part), etc. |
param |
LatParamStruct | Parameters |
lord_state |
BookkeepingStateStruct | lord bookkeeping status. |
ele_init |
EleStruct | For use by any program |
ele |
1D array of EleStruct | Array of elements [=> branch(0)]. |
branch |
1D array of BranchStruct | Branch(0:) array |
control |
1D array of ControlStruct | Control list |
particle_start |
CoordStruct | Starting particle_coords. |
beam_init |
BeamInitStruct | Beam initialization. |
pre_tracker |
PreTrackerStruct | For OPAL/IMPACT-T |
custom |
1D array of float | Custom attributes. |
version |
int | Version number |
n_ele_track |
int | Number of lat elements to track through. |
n_ele_max |
int | Index of last valid element in %ele(:) array |
n_control_max |
int | Last index used in control_array |
n_ic_max |
int | Last index used in ic_array |
input_taylor_order |
int | As set in the input file |
ic |
1D array of int | Index to %control(:) from slaves. |
photon_type |
int | Or coherent$. For X-ray simulations. |
creation_hash |
int | Set by bmad_parser. creation_hash will vary if any of the lattice files are modified. |
ramper_slave_bookkeeping |
int | |
parser_make_xfer_mats |
bool | Is Bmad parser to make element transfer matrices? |
LinacNormalModeStruct¶
Fortran struct: linac_normal_mode_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
i2_E4 |
float | Integral: g^2 * gamma^4 |
i3_E7 |
float | Integral: g^3 * gamma^7 |
i5a_E6 |
float | Integral: (g^3 * H_a) * gamma^6 |
i5b_E6 |
float | Integral: (g^3 * H_b) * gamma^6 |
sig_E1 |
float | Energy spread after 1 pass (eV) |
a_emittance_end |
float | a mode emittance at end of linac |
b_emittance_end |
float | b mode emittance at end of linac |
MadEnergyStruct¶
Fortran struct: mad_energy_struct (bmad/modules/mad_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
total |
float | |
beta |
float | normalized velocity: v/c |
gamma |
float | relativistic factor: 1/sqrt(1-beta^2) |
kinetic |
float | kinetic energy |
p0c |
float | particle momentum |
particle |
int | particle species |
MadMapStruct¶
Fortran struct: mad_map_struct (bmad/modules/mad_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
k |
1D array of float (shape: 6) | 0th order map. |
r |
2D array of float (shape: 6,6) | 1st order map. |
t |
3D array of float (shape: 6,6,6) | 2nd order map. |
Mode3Struct¶
Fortran struct: mode3_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
v |
2D array of float (shape: 6,6) | |
a |
TwissStruct | |
b |
TwissStruct | |
c |
TwissStruct | |
x |
TwissStruct | |
y |
TwissStruct |
ModeInfoStruct¶
Fortran struct: mode_info_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
stable |
bool | Is the mode stable? |
tune |
float | "fractional" tune in radians |
emit |
float | Emittance (unnormalized). |
chrom |
float | Chromaticity. |
sigma |
float | Beam size. |
sigmap |
float | Beam divergence. |
NormalModesStruct¶
Fortran struct: normal_modes_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
synch_int |
1D array of float (shape: 0:3) | Synchrotron integrals I0, I1, I2, and I3 |
sigE_E |
float | SigmaE/E |
sig_z |
float | Sigma_Z |
e_loss |
float | Energy loss / turn (eV) |
rf_voltage |
float | Total rfcavity voltage (eV) |
pz_aperture |
float | pz aperture limit. Used with Touschek calculations. |
pz_average |
float | Average over branch due to damping. |
momentum_compaction |
float | |
dpz_damp |
float | Change in pz without RF |
a |
AnormalModeStruct | |
b |
AnormalModeStruct | |
z |
AnormalModeStruct | |
lin |
LinacNormalModeStruct |
PhotonElementStruct¶
Fortran struct: photon_element_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
curvature |
SurfaceCurvatureStruct | |
target |
PhotonTargetStruct | |
material |
PhotonMaterialStruct | |
segmented |
SurfaceSegmentedStruct | |
h_misalign |
SurfaceHMisalignStruct | |
displacement |
SurfaceDisplacementStruct | |
pixel |
PixelDetecStruct | |
reflectivity_table_type |
int | |
reflectivity_table_sigma |
PhotonReflectTableStruct | If polarization is ignored use sigma table. |
reflectivity_table_pi |
PhotonReflectTableStruct | |
init_energy_prob |
1D array of SplineStruct | Initial energy probability density |
integrated_init_energy_prob |
1D array of float |
PhotonMaterialStruct¶
Fortran struct: photon_material_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
f0_m1 |
complex | For multilayer_mirror only. |
f0_m2 |
complex | For multilayer_mirror only. |
f_0 |
complex | |
f_h |
complex | Structure factor for H direction. |
f_hbar |
complex | Structure factor for -H direction. |
f_hkl |
complex | = sqrt(f_h * f_hbar) |
h_norm |
1D array of float (shape: 3) | Normalized H vector for crystals. |
l_ref |
1D array of float (shape: 3) | Crystal reference orbit displacement vector in element coords. |
PhotonReflectSurfaceStruct¶
Fortran struct: photon_reflect_surface_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | |
description |
str | Descriptive name |
reflectivity_file |
str | |
table |
1D array of PhotonReflectTableStruct | |
surface_roughness_rms |
float | sigma in Dugan's notation |
roughness_correlation_len |
float | T in Dugan's notation |
ix_surface |
int |
PhotonReflectTableStruct¶
Fortran struct: photon_reflect_table_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
angle |
1D array of float | Vector of angle values for %p_reflect |
energy |
1D array of float | Vector of energy values for %p_reflect |
int1 |
1D array of Interval1CoefStruct | |
p_reflect |
2D array of float | (angle, ev) probability. Log used for smooth surface reflection |
max_energy |
float | maximum energy for this table |
p_reflect_scratch |
1D array of float | Scratch space |
bragg_angle |
1D array of float | Bragg angle at energy values. |
PhotonTargetStruct¶
Fortran struct: photon_target_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
type |
int | or rectangular$ |
n_corner |
int | |
ele_loc |
LatEleLocStruct | |
corner |
1D array of TargetPointStruct (shape: 8) | |
center |
TargetPointStruct |
PixelDetecStruct¶
Fortran struct: pixel_detec_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
dr |
1D array of float (shape: 2) | |
r0 |
1D array of float (shape: 2) | |
n_track_tot |
int | How many photons were launched from source element. |
n_hit_detec |
int | How many photons hit the detector. |
n_hit_pixel |
int | How many photons hit the pixel grid of the detector. |
pt |
2D array of PixelPtStruct | Grid of pixels |
PixelPtStruct¶
Fortran struct: pixel_pt_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
n_photon |
int | |
E_x |
complex | |
E_y |
complex | |
intensity_x |
float | |
intensity_y |
float | |
intensity |
float | |
orbit |
1D array of float (shape: 6) | x, Vx/c, y, Vy/c, dummy, E - E_ref. |
orbit_rms |
1D array of float (shape: 6) | RMS statistics. |
init_orbit |
1D array of float (shape: 6) | Initial orbit at start of lattice statistics. |
init_orbit_rms |
1D array of float (shape: 6) | Initial orbit at start of lattice RMS statistics. |
PreTrackerStruct¶
Fortran struct: pre_tracker_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
who |
int | Can be opal\(, or impactt\) |
ix_ele_start |
int | |
ix_ele_end |
int | |
input_file |
str |
PtcNormalFormStruct¶
Fortran struct: ptc_normal_form_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ele_origin |
EleStruct | Element at which the on-turn map was created. |
orb0 |
1D array of float (shape: 6) | Closed orbit at element. |
valid_map |
bool |
RadInt1Struct¶
Fortran struct: rad_int1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
i0 |
float | |
i1 |
float | |
i2 |
float | |
i3 |
float | |
i4a |
float | |
i4b |
float | |
i4z |
float | |
i5a |
float | |
i5b |
float | |
i6b |
float | |
lin_i2_E4 |
float | |
lin_i3_E7 |
float | |
lin_i5a_E6 |
float | |
lin_i5b_E6 |
float | |
lin_norm_emit_a |
float | Running sum |
lin_norm_emit_b |
float | Running sum |
lin_sig_E |
float | Running sum |
n_steps |
float | number of qromb steps needed |
RadIntAllEleStruct¶
Fortran struct: rad_int_all_ele_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
branch |
1D array of RadIntBranchStruct | Array is indexed from 0 |
RadIntBranchStruct¶
Fortran struct: rad_int_branch_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ele |
1D array of RadInt1Struct | Array is indexed from 0 |
RadMapEleStruct¶
Fortran struct: rad_map_ele_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
rm0 |
RadMapStruct | Upstream half and downstream half matrices for an element. |
rm1 |
RadMapStruct | Upstream half and downstream half matrices for an element. |
stale |
bool |
RadMapStruct¶
Fortran struct: rad_map_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ref_orb |
1D array of float (shape: 6) | Reference point around which damp_mat is calculated. |
damp_dmat |
2D array of float (shape: 6,6) | damp_correction = xfer_mat_with_damping - xfer_mat_without_damping. |
xfer_damp_vec |
1D array of float (shape: 6) | Transfer map with damping 0th order vector. |
xfer_damp_mat |
2D array of float (shape: 6,6) | 1st order matrix: xfer_no_damp_mat + xfer_damp_correction. |
stoc_mat |
2D array of float (shape: 6,6) | Stochastic variance or "kick" (Cholesky decomposed) matrix. |
RamperLordStruct¶
Fortran struct: ramper_lord_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ix_ele |
int | Lord index |
ix_con |
int | Index in lord%control%ramp(:) array |
attrib_ptr |
float | Pointer to attribute in this element. |
ResonanceHStruct¶
Fortran struct: resonance_h_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
id |
str | 6 digit ID. EG: '003100' |
c_val |
complex | Resonance value |
RfEleStruct¶
Fortran struct: rf_ele_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
steps |
1D array of RfStairStepStruct | Energy stair step array indexed from zero. |
ds_step |
float | length of a stair step. |
RfStairStepStruct¶
Fortran struct: rf_stair_step_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
E_tot0 |
float | Reference energy in the drift region (before the kick point). |
E_tot1 |
float | Reference energy after the kick point. |
p0c |
float | Reference momentum in the drift region (before the kick point). |
p1c |
float | Reference momentum after the kick point. |
scale |
float | Scale for multipole kick at the kick point. Sum over all steps will be 1. |
time |
float | Reference particle time at the kick point with respect to beginning of element. |
s0 |
float | S-position at beginning of drift region relative to the beginning of the element. |
s |
float | S-position at the kick point relative to the beginning of the element. |
ix_step |
int | Step index in ele%rf%steps(:) array |
SpaceChargeCommonStruct¶
Fortran struct: space_charge_common_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ds_track_step |
float | CSR tracking step size |
dt_track_step |
float | Time Runge kutta initial step. |
cathode_strength_cutoff |
float | Cutoff for the cathode field calc. |
rel_tol_tracking |
float | Relative tolerance for tracking. |
abs_tol_tracking |
float | Absolute tolerance for tracking. |
beam_chamber_height |
float | Used in shielding calculation. |
lsc_sigma_cutoff |
float | Cutoff for the 1-dim longitudinal SC calc. If a bin sigma is < cutoff * sigma_ave then ignore. |
particle_sigma_cutoff |
float | 3D SC calc cutoff for particles with (x,y,z) position far from the center. Negative or zero means ignore. |
mesh_growth_factor |
float | Fractional padding when growing SC mesh (default: 10%). Set to 0 for tight-fit (no caching speedup). |
mesh_shrink_factor |
float | Fractional threshold for shrinking SC mesh (default: 10%). Mesh shrinks when bunch fills < (1-this) of the mesh range. |
space_charge_mesh_size |
1D array of int (shape: 3) | Gird size for fft_3d space charge calc. |
csr3d_mesh_size |
1D array of int (shape: 3) | Gird size for CSR. |
n_bin |
int | Number of bins used |
particle_bin_span |
int | Longitudinal particle length / dz_bin |
n_shield_images |
int | Chamber wall shielding. 0 = no shielding. |
sc_min_in_bin |
int | Minimum number of particles in a bin for sigmas to be valid. |
lsc_kick_transverse_dependence |
bool | |
debug |
bool | |
diagnostic_output_file |
str | If non-blank write a diagnostic (EG wake) file |
SpinAxisStruct¶
Fortran struct: spin_axis_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
l |
1D array of float (shape: 3) | Transverse axis. |
n0 |
1D array of float (shape: 3) | Invariant spin axis on closed orbit. |
m |
1D array of float (shape: 3) | Transverse axis. |
SpinOrbitMap1Struct¶
Fortran struct: spin_orbit_map1_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
orb_mat |
2D array of float (shape: 6,6) | Orbital matrix |
vec0 |
1D array of float (shape: 6) | Orbital 0th order map: r_out = mat6 * r_in + vec0 |
spin_q |
2D array of float (shape: 0:3,0:6) | 0th and 1st order quaternion spin map |
SpinPolarStruct¶
Fortran struct: spin_polar_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
polarization |
float | |
theta |
float | Spherical coords: Angle from z-axis. |
phi |
float | Spherical coords: Angle in (x,y) plane. |
xi |
float | Spinor phase angle (See Bmad manual). |
StrongBeamStruct¶
Fortran struct: strong_beam_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ix_slice |
int | 0 -> at element center and not at slice. |
x_center |
float | Strong beam slice center. |
y_center |
float | Strong beam slice center. |
x_sigma |
float | Strong beam slice sigma. |
y_sigma |
float | Strong beam slice sigma. |
dx |
float | Particle - beam slice distance. |
dy |
float | Particle - beam slice distance. |
SummationRdtStruct¶
Fortran struct: summation_rdt_struct (bmad/modules/srdt_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
h11001 |
complex | |
h00111 |
complex | |
h20001 |
complex | |
h00201 |
complex | |
h10002 |
complex | |
h21000 |
complex | |
h30000 |
complex | |
h10110 |
complex | |
h10020 |
complex | |
h10200 |
complex | 2nd order in K2 moments |
h31000 |
complex | |
h40000 |
complex | |
h20110 |
complex | |
h11200 |
complex | |
h20020 |
complex | |
h20200 |
complex | |
h00310 |
complex | |
h00400 |
complex | |
h22000 |
complex | |
h00220 |
complex | |
h11110 |
complex |
SurfaceCurvatureStruct¶
Fortran struct: surface_curvature_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
xy |
2D array of float (shape: 0:6,0:6) | |
spherical |
float | |
elliptical |
1D array of float (shape: 3) | Total curvature = elliptical + spherical |
has_curvature |
bool | Dependent var. Will be set by Bmad |
SurfaceDisplacementPtStruct¶
Fortran struct: surface_displacement_pt_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x0 |
float | Position at center |
y0 |
float | Position at center |
z0 |
float | |
dz_dx |
float | |
dz_dy |
float | |
d2z_dxdy |
float |
SurfaceDisplacementStruct¶
Fortran struct: surface_displacement_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
active |
bool | |
dr |
1D array of float (shape: 2) | |
r0 |
1D array of float (shape: 2) | |
pt |
2D array of SurfaceDisplacementPtStruct |
SurfaceHMisalignPtStruct¶
Fortran struct: surface_h_misalign_pt_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x0 |
float | Position at center |
y0 |
float | Position at center |
rot_y |
float | rot_t = x-rotation for Bragg and z-rotation for Laue. |
rot_t |
float | rot_t = x-rotation for Bragg and z-rotation for Laue. |
rot_y_rms |
float | rot_t = x-rotation for Bragg and z-rotation for Laue. |
rot_t_rms |
float | rot_t = x-rotation for Bragg and z-rotation for Laue. |
SurfaceHMisalignStruct¶
Fortran struct: surface_h_misalign_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
active |
bool | |
dr |
1D array of float (shape: 2) | |
r0 |
1D array of float (shape: 2) | |
pt |
2D array of SurfaceHMisalignPtStruct |
SurfaceSegmentedPtStruct¶
Fortran struct: surface_segmented_pt_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x0 |
float | Position at center |
y0 |
float | Position at center |
z0 |
float | Position at center |
dz_dx |
float | Slope at center |
dz_dy |
float | Slope at center |
SurfaceSegmentedStruct¶
Fortran struct: surface_segmented_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
active |
bool | |
dr |
1D array of float (shape: 2) | |
r0 |
1D array of float (shape: 2) | |
pt |
2D array of SurfaceSegmentedPtStruct |
TargetPointStruct¶
Fortran struct: target_point_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
r |
1D array of float (shape: 3) | (x, y, z) |
TaylorStruct¶
Fortran struct: taylor_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ref |
float | |
term |
1D array of TaylorTermStruct |
TaylorTermStruct¶
Fortran struct: taylor_term_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
float | |
expn |
1D array of int (shape: 6) |
TrackPointStruct¶
Fortran struct: track_point_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
s_lab |
float | Longitudinal lab coord with respect to the upstream end. |
s_body |
float | Longitudinal body coord with respect to the entrance end. |
orb |
CoordStruct | Particle position in lab coords. |
field |
EmFieldStruct | E&M fields in lab coordinates. |
strong_beam |
StrongBeamStruct | Strong beam info for beambeam element. |
vec0 |
1D array of float (shape: 6) | 0th order part of xfer map from the beginning. |
mat6 |
2D array of float (shape: 6,6) | 1st order part of xfer map (transfer matrix). |
TrackStruct¶
Fortran struct: track_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
pt |
1D array of TrackPointStruct | Array of track points indexed from 0. |
ds_save |
float | Min distance between points. Not positive => Save at all points. |
n_pt |
int | Track upper bound for %pt(0:) array. n_bad and n_ok are used by adaptive trackers to record the number of times the step length had to be shortened. |
n_bad |
int | Number of "bad" steps where the step length was shortened. |
n_ok |
int | Number of "good" steps where the step length was not shortened. |
TwissStruct¶
Fortran struct: twiss_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
beta |
float | |
alpha |
float | |
gamma |
float | |
phi |
float | |
eta |
float | |
etap |
float | |
deta_ds |
float | |
sigma |
float | |
sigma_p |
float | |
emit |
float | |
norm_emit |
float | |
chrom |
float | |
dbeta_dpz |
float | |
dalpha_dpz |
float | |
deta_dpz |
float | |
detap_dpz |
float |
WakeLrModeStruct¶
Fortran struct: wake_lr_mode_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
freq |
float | Actual Frequency in Hz. |
freq_in |
float | Input frequency in Hz. |
R_over_Q |
float | Strength in V/C/m^(2*m_mode). |
Q |
float | Used for backwards compatability. |
damp |
float | Damping factor = omega / 2 * Q = pi * freq / Q |
phi |
float | Phase in radians/2pi. |
angle |
float | polarization angle (radians/2pi). |
b_sin |
float | non-skew sin-like component of the wake. |
b_cos |
float | non-skew cos-like component of the wake. |
a_sin |
float | skew sin-like component of the wake. |
a_cos |
float | skew cos-like component of the wake. |
m |
int | Mode order (1 = dipole, 2 = quad, etc.) |
polarized |
bool | Polaraized mode? |
WakeLrStruct¶
Fortran struct: wake_lr_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | |
mode |
1D array of WakeLrModeStruct | |
t_ref |
float | time reference value for computing the wake amplitude. This is used to prevent value overflow with long trains. |
freq_spread |
float | Random frequency spread of long range modes. |
amp_scale |
float | Wake amplitude scale factor. |
time_scale |
float | time scale factor. |
self_wake_on |
bool | Long range self-wake used in tracking? |
WakeSrModeStruct¶
Fortran struct: wake_sr_mode_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
amp |
float | Amplitude |
damp |
float | Dampling factor. |
k |
float | k factor |
phi |
float | Phase in radians/2pi |
b_sin |
float | non-skew (x) sin-like component of the wake |
b_cos |
float | non-skew (x) cos-like component of the wake |
a_sin |
float | skew (y) sin-like component of the wake |
a_cos |
float | skew (y) cos-like component of the wake |
polarization |
int | Transverse: none\(, x_axis\), y_axis$. Not used for longitudinal. |
position_dependence |
int | Transverse: leading\(, trailing\), none$ Longitudinal: x_leading\(, ..., y_trailing\), none$ |
WakeSrStruct¶
Fortran struct: wake_sr_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
file |
str | |
z_long |
WakeSrZLongStruct | |
long_wake |
1D array of WakeSrModeStruct | |
trans_wake |
1D array of WakeSrModeStruct | |
z_ref_long |
float | z reference value for computing the wake amplitude. |
z_ref_trans |
float | This is used to prevent value overflow with long bunches. |
z_max |
float | Max allowable z value. 0-> ignore |
amp_scale |
float | Wake amplitude scale factor. |
z_scale |
float | z-distance scale factor. |
scale_with_length |
bool | Scale wake with element length? |
WakeSrZLongStruct¶
Fortran struct: wake_sr_z_long_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
w |
1D array of float | Input single particle Wake. Indexed from 1. |
fw |
1D array of complex | Fourier transform of w. |
fbunch |
1D array of complex | Scratch space. |
w_out |
1D array of complex | Scratch space. |
dz |
float | Distance between points. If zero there is no wake. |
z0 |
float | Wake extent is [-z0, z0]. |
smoothing_sigma |
float | 0 => No smoothing. |
position_dependence |
int | Transverse: leading\(, trailing\), none$ Longitudinal: x_leading\(, ..., y_trailing\), none$ |
time_based |
bool | Was input time based? |
WakeStruct¶
Fortran struct: wake_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
sr |
WakeSrStruct | Short-range wake |
lr |
WakeLrStruct | Long-range wake |
Wall3DSectionStruct¶
Fortran struct: wall3d_section_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | Identifying name |
material |
str | Material. |
v |
1D array of Wall3dVertexStruct | Array of vertices. Always stored relative. |
surface |
PhotonReflectSurfaceStruct | Surface reflectivity tables. |
type |
int | normal\(, clear\), opaque\(, wall_start\), wall_end$ |
n_vertex_input |
int | Number of vertices specified by the user. |
ix_ele |
int | index of lattice element containing section |
ix_branch |
int | Index of branch lattice element is in. |
vertices_state |
int | absolute\(, or shifted_to_relative\). If set to absolute$ on input, will be changed to shifted_to_relative$ by section initalizer. |
patch_in_region |
bool | Patch element exists between this section and previous one? |
thickness |
float | Material thickness. |
s |
float | Longitudinal position |
r0 |
1D array of float (shape: 2) | Center of section Section-to-section spline interpolation of the center of the section |
dx0_ds |
float | Center of wall derivative |
dy0_ds |
float | Center of wall derivative |
x0_coef |
1D array of float (shape: 0:3) | Spline coefs for x-center |
y0_coef |
1D array of float (shape: 0:3) | Spline coefs for y-center Section-to_section spline interpolation of the wall. |
dr_ds |
float | derivative of wall radius |
p1_coef |
1D array of float (shape: 3) | Spline coefs for p0 function |
p2_coef |
1D array of float (shape: 3) | Spline coefs for p1 function |
Wall3DStruct¶
Fortran struct: wall3d_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
str | |
type |
int | or mask_plate$ |
ix_wall3d |
int | Index in branch%wall3d(:) array. |
n_link |
int | For memory management of ele%wall3d |
thickness |
float | For diffraction_plate elements |
clear_material |
str | |
opaque_material |
str | |
superimpose |
bool | Can overlap another wall |
ele_anchor_pt |
int | anchor_beginning\(, anchor_center\), or anchor_end$ |
section |
1D array of Wall3dSectionStruct | Indexed from 1. |
Wall3DVertexStruct¶
Fortran struct: wall3d_vertex_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x |
float | Coordinates of the vertex. |
y |
float | Coordinates of the vertex. |
radius_x |
float | Radius of arc or ellipse x-axis half width. 0 => Straight line. |
radius_y |
float | Ellipse y-axis half height. |
tilt |
float | Tilt of ellipse |
angle |
float | Angle of (x, y) point. |
x0 |
float | Center of ellipse |
y0 |
float | Center of ellipse |
type |
int | No longer used. |
XyDispStruct¶
Fortran struct: xy_disp_struct (bmad/modules/bmad_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
eta |
float | |
etap |
float | |
deta_ds |
float | |
sigma |
float | |
deta_dpz |
float | |
detap_dpz |
float |
Procedures¶
ab_multipole_kick¶
Fortran source: bmad/modules/multipole_mod.f90
ab_multipole_kick(a: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex, ref_species: typing.SupportsInt | typing.SupportsIndex, ele_orientation: typing.SupportsInt | typing.SupportsIndex, coord: pybmad._pybmad.CoordStruct, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, scale: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.AbMultipoleKick
Subroutine ab_multipole_kick (a, b, n, ref_species, ele_orientation, coord, kx, ky, dk, pole_type, scale)
Subroutine to put in the kick due to an ab_multipole.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ab_multipole_kicks¶
Fortran source: bmad/modules/multipole_mod.f90
ab_multipole_kicks(an: pybmad._pybmad.RealArray1D, bn: pybmad._pybmad.RealArray1D, ix_pole_max: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, scale: typing.SupportsFloat | typing.SupportsIndex | None = None, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine ab_multipole_kicks (an, bn, ix_pole_max, ele, orbit, pole_type, scale, mat6, make_matrix)
Routine to put in the kick due to ab_multipole components in an element. The kick will be corrected for the orientation of the element and the particle direction of travel. Any difference between element p0c and orbit%p0c will be taken into account.
Also see the multipole_kicks routine.
| Parameters: |
|
|---|
absolute_photon_position¶
Fortran source: bmad/photon/photon_init_mod.f90
absolute_photon_position(e_orb: pybmad._pybmad.CoordStruct, photon_orb: pybmad._pybmad.CoordStruct) -> None
Subroutine absolute_photon_position (e_orb, photon_orb)
Routine to calculate the photon phase space coordinates given: 1) The phase space coords of the emitting charged particle and 2) The photon phase space coords relative to the emitting particle. The photon (x, y, z) position is ignored (it is assumed the photon is emitted at the charged particle position) and only the photon's (vx, vy, vz) velocity matters.
| Parameters: |
|
|---|
absolute_time_tracking¶
Fortran source: bmad/modules/bmad_routine_interface.f90
absolute_time_tracking(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine absolute_time_tracking
| Parameters: |
|
|---|
| Returns: |
|
|---|
ac_kicker_amp¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ac_kicker_amp(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, true_time: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine ac_kicker_amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
action_to_xyz¶
Fortran source: bmad/modules/mode3_mod.f90
action_to_xyz(ring: pybmad._pybmad.LatStruct, ix: typing.SupportsInt | typing.SupportsIndex, J: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]) -> pybmad._pybmad.ActionToXyz
Subroutine action_to_xyz(ring, ix, J, X, err_flag)
Given the normal mode invariants and phases J of a particle, returns the canonical coordinates.
The J vector looks like: J = (sqrt(2Ja)cos(phia), -sqrt(2Ja)sin(phia), sqrt(2Jb)cos(phib), -sqrt(2Jb)sin(phib), sqrt(2Jc)cos(phic), -sqrt(2Jc)sin(phic))
X is obtained from: X = N . J Where N is from the Eigen decomposition of the 1-turn transfer matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
add_lattice_control_structs¶
Fortran source: bmad/modules/bmad_routine_interface.f90
add_lattice_control_structs(ele: pybmad._pybmad.EleStruct, n_add_slave: typing.SupportsInt | typing.SupportsIndex | None = None, n_add_lord: typing.SupportsInt | typing.SupportsIndex | None = None, n_add_slave_field: typing.SupportsInt | typing.SupportsIndex | None = None, n_add_lord_field: typing.SupportsInt | typing.SupportsIndex | None = None, add_at_end: bool | None = None) -> None
Wrapper for Fortran routine add_lattice_control_structs
| Parameters: |
|
|---|
add_superimpose¶
Fortran source: bmad/modules/superimpose_mod.f90
add_superimpose(lat: pybmad._pybmad.LatStruct, super_ele_in: pybmad._pybmad.EleStruct, ix_branch: typing.SupportsInt | typing.SupportsIndex, save_null_drift: bool | None = None, create_jumbo_slave: bool | None = None, ix_insert: typing.SupportsInt | typing.SupportsIndex | None = None, mangle_slave_names: bool | None = None, wrap: bool | None = None) -> pybmad._pybmad.AddSuperimpose
Subroutine add_superimpose (lat, super_ele_in, ix_branch, err_flag, super_ele_out, save_null_drift, create_jumbo_slave, ix_insert, mangle_slave_names, wrap)
Routine to superimpose an element. If the element can be inserted into the lat without making a super_lord element then this will be done.
Note: This routine, since it handles only one superposition, is not sufficient for superposition in a multipass region. For historical reasons, the extra code needed is buried in the parser_add_superimpose code. If you need to do multipass superpositions please contact David Sagan and this situation will be rectified.
Note: Bookkeeping like recalculating reference energies and recalculating transfer matrices is not done by this routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
add_this_multipass¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
add_this_name_to_list¶
Fortran source: bmad/output/write_lattice_file_mod.f90
add_this_name_to_list(ele: pybmad._pybmad.EleStruct, names: pybmad._pybmad.CharacterAlloc1D, an_indexx: pybmad._pybmad.IntAlloc1D, n_names: typing.SupportsInt | typing.SupportsIndex, ix_match: typing.SupportsInt | typing.SupportsIndex, has_been_added: bool, named_eles: pybmad._pybmad.ElePointerStructAlloc1D) -> None
Wrapper for Fortran routine add_this_name_to_list
| Parameters: |
|
|---|
add_this_taylor_term¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
add_this_taylor_term(ele: pybmad._pybmad.EleStruct, i_out: typing.SupportsInt | typing.SupportsIndex, coef: typing.SupportsFloat | typing.SupportsIndex, expn: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(6)"]) -> None
Subroutine add_this_taylor_term (ele, i_out, coef, expn)
Subroutine used by bmad_parser and bmad_parser2 to parse the input file. This subroutine is not intended for general use.
adjust_super_slave_names¶
Fortran source: bmad/modules/superimpose_mod.f90
adjust_super_slave_names(lat: pybmad._pybmad.LatStruct, ix1_lord: typing.SupportsInt | typing.SupportsIndex, ix2_lord: typing.SupportsInt | typing.SupportsIndex, first_time: bool | None = None) -> None
Subroutine adjust_super_slave_names (lat, ix1_lord, ix2_lord, first_time)
Routine to adjust the names of the slaves. This routine is used by add_superimpose and is not meant for general use.
allocate_branch_array¶
Fortran source: bmad/modules/bmad_routine_interface.f90
allocate_branch_array(lat: pybmad._pybmad.LatStruct, upper_bound: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine allocate_branch_array
| Parameters: |
|
|---|
allocate_grid_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
allocate_grid_field(g_field: pybmad._pybmad.GridFieldStructArray1D, n_gf: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine allocate_grid_field
| Parameters: |
|
|---|
allocate_lat_ele_array¶
Fortran source: bmad/modules/bmad_routine_interface.f90
allocate_lat_ele_array(lat: pybmad._pybmad.LatStruct, upper_bound: typing.SupportsInt | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, do_ramper_slave_setup: bool | None = None) -> None
Wrapper for Fortran routine allocate_lat_ele_array
| Parameters: |
|
|---|
angle_between_polars¶
Fortran source: bmad/modules/bmad_routine_interface.f90
angle_between_polars(polar1: pybmad._pybmad.SpinPolarStruct, polar2: pybmad._pybmad.SpinPolarStruct) -> float
Wrapper for Fortran routine angle_between_polars
| Parameters: |
|
|---|
| Returns: |
|
|---|
angle_to_canonical_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
angle_to_canonical_coords(orbit: pybmad._pybmad.CoordStruct, coord_type: str | None = None) -> None
Wrapper for Fortran routine angle_to_canonical_coords
| Parameters: |
|
|---|
aperture_bookkeeper¶
Fortran source: bmad/modules/bookkeeper_mod.f90
aperture_bookkeeper(ele: pybmad._pybmad.EleStruct) -> None
Subroutine aperture_bookkeeper (ele)
Routine to calculate aperture limits when ele%attribute_type is set to auto_aperture$
| Parameters: |
|
|---|
apply_all_rampers¶
Fortran source: bmad/modules/bmad_routine_interface.f90
apply_all_rampers(lat: pybmad._pybmad.LatStruct) -> bool
Wrapper for Fortran routine apply_all_rampers
| Parameters: |
|
|---|
| Returns: |
|
|---|
apply_energy_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
apply_energy_kick(dE: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, ddE_dr: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine apply_energy_kick
| Parameters: |
|
|---|
apply_patch_to_ptc_fibre¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
apply_patch_to_ptc_fibre(ele: pybmad._pybmad.EleStruct) -> None
Subroutine apply_patch_to_ptc_fibre (ele)
Routine to take the patch parameters from a Bmad patch element and transfer them to the associated PTC fibre.
| Parameters: |
|
|---|
apply_rampers_to_slave¶
Fortran source: bmad/modules/bmad_routine_interface.f90
apply_rampers_to_slave(slave: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine apply_rampers_to_slave
| Parameters: |
|
|---|
| Returns: |
|
|---|
array_re_str¶
Fortran source: bmad/output/write_lattice_file_mod.f90
array_re_str(arr: pybmad._pybmad.RealArray1D, str_out: str, parens_in: str | None = None) -> None
Wrapper for Fortran routine array_re_str
| Parameters: |
|
|---|
astra_max_field_reference¶
Fortran source: bmad/interface/astra_interface_mod.f90
astra_max_field_reference(pt0: pybmad._pybmad.GridFieldPt1Struct, ele: pybmad._pybmad.EleStruct, field_value: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine astra_max_field_reference
| Parameters: |
|
|---|
at_this_ele_end¶
Fortran source: bmad/modules/bmad_routine_interface.f90
at_this_ele_end(now_at: typing.SupportsInt | typing.SupportsIndex, where_at: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine at_this_ele_end
| Parameters: |
|
|---|
| Returns: |
|
|---|
attribute_bookkeeper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
attribute_bookkeeper(ele: pybmad._pybmad.EleStruct, force_bookkeeping: bool | None = None) -> None
Wrapper for Fortran routine attribute_bookkeeper
| Parameters: |
|
|---|
attribute_free¶
Fortran sources (overloaded):
attribute_free1:bmad/modules/attribute_mod.f90attribute_free2:bmad/modules/attribute_mod.f90attribute_free3:bmad/modules/attribute_mod.f90
attribute_free(args, *kwargs) Overloaded function.
- attribute_free(ix_ele: typing.SupportsInt | typing.SupportsIndex, attrib_name: str, lat: pybmad._pybmad.LatStruct, err_print_flag: bool | None = None, except_overlay: bool | None = None, dependent_attribs_free: bool | None = None) -> pybmad._pybmad.AttributeFree1
Function attribute_free
Overloaded function for: Function attribute_free1 (ix_ele, attrib_name, lat, err_print_flag, except_overlay, dependent_attribs_free, why_not_free) result (free) Function attribute_free2 (ele, attrib_name, err_print_flag, except_overlay, dependent_attribs_free, why_not_free) result (free) Function attribute_free3 (ix_ele, ix_branch, attrib_name, lat, err_print_flag, except_overlay, dependent_attribs_free, why_not_free) result (free)
Routine to check if an attribute is free to vary.
Attributes that cannot be changed directly include super_slave attributes (since these attributes are controlled by their super_lords) and attributes that are controlled by an overlay.
Also dependent variables such as the angle of a bend cannot be freely variable.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
attribute_index¶
Fortran sources (overloaded):
attribute_index1:bmad/modules/attribute_mod.f90attribute_index2:bmad/modules/attribute_mod.f90
attribute_index(args, *kwargs) Overloaded function.
- attribute_index(ele: pybmad._pybmad.EleStruct, name: str, can_abbreviate: bool | None = None, print_error: bool | None = None) -> pybmad._pybmad.AttributeIndex1
Function attribute_index (...) result (attrib_index)
Function to return the index of a attribute for a given BMAD element type and the name of the attribute. Abbreviations are by default permitted but must be at least 3 characters. Exception: overlay and group varialbe names may not be abbreviated.
This routine is an overloaded name for: attribute_index1 (ele, name, full_name, can_abbreviate, print_error) result (attrib_index) attribute_index2 (key, name, full_name, can_abbreviate, print_error) result (attrib_index)
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
If ele%key or key = 0 -> Entire name table will be searched. See also: has_attribute attribute_info attribute_name
- attribute_index(key: typing.SupportsInt | typing.SupportsIndex, name: str, can_abbreviate: bool | None = None, print_error: bool | None = None) -> pybmad._pybmad.AttributeIndex2
Function attribute_index (...) result (attrib_index)
Function to return the index of a attribute for a given BMAD element type and the name of the attribute. Abbreviations are by default permitted but must be at least 3 characters. Exception: overlay and group varialbe names may not be abbreviated.
This routine is an overloaded name for: attribute_index1 (ele, name, full_name, can_abbreviate, print_error) result (attrib_index) attribute_index2 (key, name, full_name, can_abbreviate, print_error) result (attrib_index)
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
If ele%key or key = 0 -> Entire name table will be searched. See also: has_attribute attribute_info attribute_name
attribute_name¶
Fortran sources (overloaded):
attribute_name1:bmad/modules/attribute_mod.f90attribute_name2:bmad/modules/attribute_mod.f90
attribute_name(args, *kwargs) Overloaded function.
- attribute_name(key: typing.SupportsInt | typing.SupportsIndex, ix_att: typing.SupportsInt | typing.SupportsIndex, show_private: bool | None = None) -> str
Function attribute_name (...) result (attrib_name)
Function to return the name of an attribute for a particular type of Bmad element.
This routine is an overloaded name for: attribute_name1 (ele, ix_att, show_private) result (attrib_name) attribute_name2 (key, ix_att, show_private) result (attrib_name)
Note: attribute_name (key, ix_att) is not able to handle overlay/group control variables. Use attributge_name (ele, ix_att) is this is needed.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
attribute_type¶
Fortran source: bmad/modules/attribute_mod.f90
attribute_type(attrib_name: str, ele: pybmad._pybmad.EleStruct | None = None) -> int
Function attribute_type (attrib_name, ele) result (attrib_type)
Routine to return the logical type of an attribute.
A "switch" attribute is an attribute whose value corresponds to some string. For example, the "COUPLER_AT" attirbute with value 1 corresponds to "ENTRANCE_END", etc.
A "struct" attribute is an attribute that is the name for a "structure". For example, CARTESIAN_MAP is the name of the structure hoding a Cartesian map.
If attrib_name corresponds to a switch attribute, The routine switch_attrib_value_name can be used to print the name corresponding to the attribute's value.
Note: The "storage type" of an attribute is different from the "logical type" returned by this routine. For example, the logical type of attribute "n_slice" is integer. However, the value of "n_slice" is stored as a real number in the ele_struct [in ele%value(n_slice$)].
| Parameters: |
|
|---|
| Returns: |
|
|---|
attribute_units¶
Fortran source: bmad/modules/attribute_mod.f90
attribute_units(attrib_name: str, unrecognized_units: str | None = None) -> str
Function attribute_units (attrib_name, unrecognized_units) result (attrib_units)
Routine to return the units associated with an attribute. Example: attrib_units('P0C') -> 'eV'
| Parameters: |
|
|---|
| Returns: |
|
|---|
autoscale_phase_and_amp¶
Fortran source: bmad/modules/bmad_routine_interface.f90
autoscale_phase_and_amp(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, scale_phase: bool | None = None, scale_amp: bool | None = None, call_bookkeeper: bool | None = None) -> bool
Wrapper for Fortran routine autoscale_phase_and_amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
average_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
average_twiss(frac1: typing.SupportsFloat | typing.SupportsIndex, twiss1: pybmad._pybmad.TwissStruct, twiss2: pybmad._pybmad.TwissStruct) -> pybmad._pybmad.TwissStruct
Wrapper for Fortran routine average_twiss
| Parameters: |
|
|---|
| Returns: |
|
|---|
bbi_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bbi_kick(x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, sigma: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], linear_kick: bool | None = None) -> pybmad._pybmad.BbiKick
Wrapper for Fortran routine bbi_kick
| Parameters: |
|
|---|
| Returns: |
|
|---|
bbi_slice_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bbi_slice_calc(ele: pybmad._pybmad.EleStruct, n_slice: typing.SupportsInt | typing.SupportsIndex, z_slice: pybmad._pybmad.RealArray1D) -> None
Wrapper for Fortran routine bbi_slice_calc
| Parameters: |
|
|---|
beam_envelope_ibs¶
Fortran source: bmad/multiparticle/envelope_mod.f90
beam_envelope_ibs(sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], tail_cut: bool, tau: typing.SupportsFloat | typing.SupportsIndex, energy: typing.SupportsFloat | typing.SupportsIndex, n_part: typing.SupportsFloat | typing.SupportsIndex, species: typing.SupportsInt | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"]
Subroutine beam_envelope_ibs(sigma_mat, ibs_mat, tail_cut, tau, energy, n_part, species)
This is a sigma matrix based IBS calculation. It takes the beam sigma matrix and returns a matrix with changes to the 2nd order moments due to IBS.
Use ibs_mat to change the sigma matrix like this: sigma_matrix_updated = sigma_matrix + ibs_mat*element_length See subroutine transport_with_sr_and_ibs in this module.
| Parameters: |
|
|---|
| Returns: |
|
|---|
beam_equal_beam¶
Fortran source: bmad/modules/bmad_routine_interface.f90
beam_equal_beam(beam1: pybmad._pybmad.BeamStruct, beam2: pybmad._pybmad.BeamStruct) -> None
Wrapper for Fortran routine beam_equal_beam
| Parameters: |
|
|---|
beam_init_setup¶
Fortran source: bmad/modules/bmad_routine_interface.f90
beam_init_setup(beam_init_in: pybmad._pybmad.BeamInitStruct, ele: pybmad._pybmad.EleStruct, species: typing.SupportsInt | typing.SupportsIndex, modes: pybmad._pybmad.NormalModesStruct | None = None) -> pybmad._pybmad.BeamInitSetup
Wrapper for Fortran routine beam_init_setup
| Parameters: |
|
|---|
| Returns: |
|
|---|
beam_tilts¶
Fortran source: bmad/modules/mode3_mod.f90
beam_tilts(S: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.BeamTilts
Subroutine beam_tilts(S, angle_xy, angle_xz, angle_yz, angle_xpz, angle_ypz)
Given a 6x6 matrix of second-order moments, this routine returns the beam tilts.
angle_xy is obtained from the projection of the beam envelop into the xy plane. The angle is that between the major axis of the projected beam envelope and the +x axis. Positive angles are measured towards the +y axis.
angle_xz is obtained from the projection of the beam envelop into the xy plane. The angle is that between the major axis of the projected beam envelope and the +z axis. Positive angles are measured towards the +x axis.
angle_yz is obtained from the projection of the beam envelop into the yz plane. The angle is that between the major axis of the projected beam envelope and the +z axis. Positive angles are measured towards the +y axis.
| Parameters: |
|
|---|
| Returns: |
|
|---|
beambeam_fibre_setup¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None, track_spin: bool | None = None) -> None
Subroutine bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix, track_spin)
Subroutine to track through the edge field of an sbend. This routine is called by apply_element_edge_kick only.
| Parameters: |
|
|---|
bend_exact_multipole_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bend_exact_multipole_field(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct, local_ref_frame: bool, calc_dfield: bool | None = None, calc_potential: bool | None = None) -> pybmad._pybmad.EmFieldStruct
Wrapper for Fortran routine bend_exact_multipole_field
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_length_has_been_set¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bend_length_has_been_set(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine bend_length_has_been_set
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_e_rel_init¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_e_rel_init(r_in: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Function bend_photon_e_rel_init (r_in) result (E_rel)
Routine to convert a random number in the interval [0,1] to a photon energy. The photon probability spectrum is: P(E_rel) = (3 / (5 * Pi)) * Integral_{E_rel}^{Infty} K_{5/3}(x) dx Where P(E_rel)) = Probability of finding a photon at relative energy E_rel. E_rel = Relative photon energy: E / E_crit, E_crit = Critical energy. K_{5/3} = Modified Bessel function.
Notice that the P(E) is not the same as the distribution radiation energy since the photons must be energy weighted.
There is a cut-off built into the calculation so that E_rel will be in the range [0, 31.4]. The error in neglecting photons with E_rel > 31.4 translates to neglecting one photon for every 10^15 generated. If r_in is present: r_in = 0 => E_rel = 0 r_in = 1 => E_rel = 31.4
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_energy_integ_prob¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_energy_integ_prob(E_photon: typing.SupportsFloat | typing.SupportsIndex, g_bend: typing.SupportsFloat | typing.SupportsIndex, gamma: typing.SupportsFloat | typing.SupportsIndex) -> float
Function bend_photon_energy_integ_prob (E_photon, g_bend, gamma) result (integ_prob)
Routine to find the integrated probability corresponding to emitting a photon from a bend in the range [0, E_photon].
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_energy_normalized_probability¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_energy_normalized_probability(E_rel: typing.SupportsFloat | typing.SupportsIndex) -> float
Function bend_photon_energy_normalized_probability (E_rel) result (prob)
Routine to return the normalized probability that a photon will be emitted in a bend with energy E_rel relative to the critical energy. The probability is normalized such that Integral[0,Infinity] dE_rel P(E_rel) = 1
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_init¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_init(g_bend_x: typing.SupportsFloat | typing.SupportsIndex, g_bend_y: typing.SupportsFloat | typing.SupportsIndex, gamma: typing.SupportsFloat | typing.SupportsIndex, E_min: typing.SupportsFloat | typing.SupportsIndex | None = None, E_max: typing.SupportsFloat | typing.SupportsIndex | None = None, E_integ_prob: typing.SupportsFloat | typing.SupportsIndex | None = None, vert_angle_min: typing.SupportsFloat | typing.SupportsIndex | None = None, vert_angle_max: typing.SupportsFloat | typing.SupportsIndex | None = None, vert_angle_symmetric: bool | None = None, emit_probability: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.CoordStruct
Subroutine bend_photon_init (g_bend_x, g_bend_y, gamma, orbit, E_min, E_max, E_integ_prob, vert_angle_min, vert_angle_max, vert_angle_symmetric, emit_probability)
Routine to initalize a photon for dipole bends and wigglers (but not undulators). The photon is initialized using the standard formulas for bending radiation.
The energy of the photon is calculated in one of two ways:
1) If E_integ_prob is present and non-negative, the photon energy E will be such that the integrated probability [E_min, E] relative to the integrated probability in the range [E_min, E_max] is E_integ_prob. That is, E_integ_prob can be used to to give a set of photon energies equally spaced in terms of the integrated probability distribution.
2) If E_integ_prob is not present, or is negative, the photon energy is chosen at random in the range [E_min, E_max].
An E_integ_prob of zero means that the generated photon will have energy E_min. An E_integ_prob of one means that the generated photon will have energy E_max.
The photon's polarization, will have unit amplitude.
This routine assumes that the emitting charged particle is on-axis and moving in the forward direction. To correct for the actual charged particle postion use the routine absolute_photon_position
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_polarization_init¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_polarization_init(g_bend_x: typing.SupportsFloat | typing.SupportsIndex, g_bend_y: typing.SupportsFloat | typing.SupportsIndex, E_rel: typing.SupportsFloat | typing.SupportsIndex, gamma_phi: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.CoordStruct
Subroutine bend_photon_polarization_init (g_bend_x, g_bend_y, E_rel, gamma_phi, orbit)
Routine to set a photon's polarization. The photon's polarization will be either in the plane of the bend or out of the plane and the magnitude will be 1.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_photon_vert_angle_init¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_photon_vert_angle_init(E_rel: typing.SupportsFloat | typing.SupportsIndex, gamma: typing.SupportsFloat | typing.SupportsIndex, r_in: typing.SupportsFloat | typing.SupportsIndex | None = None, invert: bool | None = None) -> float
Function bend_photon_vert_angle_init (E_rel, gamma, r_in, invert) result (phi)
Routine to convert an integrated probability to a vertical angle for emitting a photon from a bend. The integrated probability is in the range [0,1] with 0 corresponding to a phi = -pi/2 and integrated probability of 1 corresponding to phi = pi/2.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_shift¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bend_shift(position1: pybmad._pybmad.FloorPositionStruct, g: typing.SupportsFloat | typing.SupportsIndex, delta_s: typing.SupportsFloat | typing.SupportsIndex, ref_tilt: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.BendShift
Wrapper for Fortran routine bend_shift
| Parameters: |
|
|---|
| Returns: |
|
|---|
bend_vert_angle_integ_prob¶
Fortran source: bmad/photon/photon_init_mod.f90
bend_vert_angle_integ_prob(vert_angle: typing.SupportsFloat | typing.SupportsIndex, E_rel: typing.SupportsFloat | typing.SupportsIndex, gamma: typing.SupportsFloat | typing.SupportsIndex) -> float
Function bend_vert_angle_integ_prob (vert_angle, E_rel, gamma) result (integ_prob)
Routine to find the integrated probability corresponding to emitting a photon from a bend and with relative energy E_rel in the vertical angle range [-pi/2, vert_angle/2].
Note: vert_angle is allowed to be out of the range [-pi/2, pi/2]. In this case, integ_prob will be set to 0 or 1 as appropriate.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bl_via_vlassov¶
Fortran source: bmad/multiparticle/ibs_mod.f90
bl_via_vlassov(current: typing.SupportsFloat | typing.SupportsIndex, alpha: typing.SupportsFloat | typing.SupportsIndex, Energy: typing.SupportsFloat | typing.SupportsIndex, sigma_p: typing.SupportsFloat | typing.SupportsIndex, Vrf: typing.SupportsFloat | typing.SupportsIndex, omega: typing.SupportsFloat | typing.SupportsIndex, U0: typing.SupportsFloat | typing.SupportsIndex, circ: typing.SupportsFloat | typing.SupportsIndex, R: typing.SupportsFloat | typing.SupportsIndex, L: typing.SupportsFloat | typing.SupportsIndex) -> float
Subroutine bl_via_vlassov(current,alpha,Energy,sigma_p,Vrf,omega,U0,circ,R,L,sigma_z)
This is a frontend for get_bl_from_fwhm from longitudinal_profile_mod. See longitudinal_profile_mod for details. In short, this implements a model of potential well distortion based on the Vlassov equation which uses an effective Resistive, Inductive, and Capacitive impedance.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bmad_parser¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bmad_parser(lat_file: str, make_mats6: bool | None = None, use_line: str | None = None) -> pybmad._pybmad.BmadParser
Wrapper for Fortran routine bmad_parser
| Parameters: |
|
|---|
| Returns: |
|
|---|
bmad_parser2¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bmad_parser2(lat_file: str, lat: pybmad._pybmad.LatStruct, orbit: pybmad._pybmad.CoordStructArray1D | None = None, make_mats6: bool | None = None, err_flag: bool | None = None, parse_lat: pybmad._pybmad.LatStruct | None = None) -> None
Wrapper for Fortran routine bmad_parser2
| Parameters: |
|
|---|
bmad_patch_parameters_to_ptc¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
bmad_patch_parameters_to_ptc(ang: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], exi: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"]) -> None
Wrapper for Fortran routine bmad_patch_parameters_to_ptc
| Parameters: |
|
|---|
bp_set_ran_status¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
bp_set_ran_status() -> None
Wrapper for Fortran routine bp_set_ran_status
branch_equal_branch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
branch_equal_branch(branch1: pybmad._pybmad.BranchStruct, branch2: pybmad._pybmad.BranchStruct) -> None
Wrapper for Fortran routine branch_equal_branch
| Parameters: |
|
|---|
branch_name¶
Fortran source: bmad/modules/bmad_routine_interface.f90
branch_name(branch: pybmad._pybmad.BranchStruct) -> str
Wrapper for Fortran routine branch_name
| Parameters: |
|
|---|
| Returns: |
|
|---|
branch_to_ptc_m_u¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
branch_to_ptc_m_u(branch: pybmad._pybmad.BranchStruct) -> None
Subroutine branch_to_ptc_m_u (branch)
Subroutine to create a PTC layout from a Bmad lattice branch. Note: If lat_to_ptc_layout has already been setup, you should first do a call kill_ptc_layouts(lat) This deallocates the pointers in PTC
Note: If not already done, before you call this routine you need to first call: call set_ptc (...) [This is normally done in bmad_parser.]
Note: If a Bmad element is using a hard edge model (EG: RFcavity element), there will be three corresponding PTC fibre elements: (drift, RF. drift) for example. In this case, ele%ptc_fibre will be set to point to the last PTC fibre. That is the exit end of ele will correspond to the exit end of ele%ptc_fibre.
| Parameters: |
|
|---|
bunch_equal_bunch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
bunch_equal_bunch(bunch1: pybmad._pybmad.BunchStruct, bunch2: pybmad._pybmad.BunchStruct) -> None
Wrapper for Fortran routine bunch_equal_bunch
| Parameters: |
|
|---|
c_to_cbar¶
Fortran source: bmad/modules/bmad_routine_interface.f90
c_to_cbar(ele: pybmad._pybmad.EleStruct) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(2)"]], "FixedSize(2)"]
Wrapper for Fortran routine c_to_cbar
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_bunch_params¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_bunch_params(bunch: pybmad._pybmad.BunchStruct, print_err: bool | None = None, is_time_coords: bool | None = None, ele: pybmad._pybmad.EleStruct | None = None) -> pybmad._pybmad.CalcBunchParams
Subroutine calc_bunch_params (bunch, bunch_params, error, print_err, n_mat, is_time_coords, ele)
Finds all bunch parameters defined in bunch_params_struct, both normal-mode and projected. Projected parameters are found purely from the geometrical distribution of the beam. Normal-Mode parameters are found using the method developed in: "Alternate approach to general coupled linear optics" A. Wolski, PRST AB 9, 024001 (2006)
Note: If less than two particle remain then the various parameters will be set to zero.
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_bunch_params_slice¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_bunch_params_slice(bunch: pybmad._pybmad.BunchStruct, bunch_params: pybmad._pybmad.BunchParamsStruct, plane: typing.SupportsInt | typing.SupportsIndex, slice_center: typing.SupportsFloat | typing.SupportsIndex, slice_spread: typing.SupportsFloat | typing.SupportsIndex, print_err: bool | None = None, is_time_coords: bool | None = None, ele: pybmad._pybmad.EleStruct | None = None) -> bool
subroutine calc_bunch_params_slice (bunch, bunch_params, plane, slice_center, slice_spread, err, print_err, is_time_coords, ele)
Finds bunch parameters for a slice of the beam.
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_bunch_params_z_slice¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_bunch_params_z_slice(bunch: pybmad._pybmad.BunchStruct, bunch_params: pybmad._pybmad.BunchParamsStruct, slice_bounds: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], print_err: bool | None = None, is_time_coords: bool | None = None, ele: pybmad._pybmad.EleStruct | None = None) -> bool
subroutine calc_bunch_params_z_slice (bunch, bunch_params, slice_bounds, err, print_err, is_time_coords, ele)
Finds bunch parameters for a slice of the beam.
The slice is specified in terms of percentage of particles ordered by z-position. For example, slice_bounds = [0.0, 0.5] specifies the trailing half of the bunch
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_bunch_sigma_matrix_etc¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_bunch_sigma_matrix_etc(particle: pybmad._pybmad.CoordStructArray1D, charge: pybmad._pybmad.RealArray1D, is_time_coords: bool | None = None, ele: pybmad._pybmad.EleStruct | None = None) -> pybmad._pybmad.BunchParamsStruct
Subroutine calc_bunch_sigma_matrix_etc (particle, charge, bunch_params, is_time_coords, ele)
Routine to find the sigma matrix elements of a particle distribution.
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_emittances_and_twiss_from_sigma_matrix¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_emittances_and_twiss_from_sigma_matrix(sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], print_err: bool | None = None) -> pybmad._pybmad.CalcEmittancesAndTwissFromSigmaMatrix
Subroutine calc_emittances_and_twiss_from_sigma_matrix(sigma_mat, bunch_params, error, print_err, n_mat)
Routine to calc emittances and Twiss function from a beam sigma matrix. See: Andy Wolski "Alternative approach to general coupled linear optics".
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_spin_params¶
Fortran source: bmad/multiparticle/beam_utils.f90
calc_spin_params(bunch: pybmad._pybmad.BunchStruct) -> pybmad._pybmad.BunchParamsStruct
Subroutine calc_spin_params (bunch, bunch_params)
Rotine to calculate spin averages
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_super_slave_key¶
Fortran source: bmad/modules/bmad_routine_interface.f90
calc_super_slave_key(lord1: pybmad._pybmad.EleStruct, lord2: pybmad._pybmad.EleStruct, create_jumbo_slave: bool | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine calc_super_slave_key
| Parameters: |
|---|
| Returns: |
|
|---|
calc_wall_radius¶
Fortran source: bmad/modules/wall3d_mod.f90
calc_wall_radius(v: pybmad._pybmad.Wall3DVertexStructArray1D, cos_ang: typing.SupportsFloat | typing.SupportsIndex, sin_ang: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.CalcWallRadius
Subroutine calc_wall_radius (v, cos_ang, sin_ang, r_wall, dr_dtheta, ix_vertex)
Routine to calculate the wall radius at a given angle for a given cross-section Additionally, the transverse directional derivative is calculated.
Module needed: use wall3d_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_z_tune¶
Fortran source: bmad/modules/bmad_routine_interface.f90
calc_z_tune(branch: pybmad._pybmad.BranchStruct) -> None
Wrapper for Fortran routine calc_z_tune
| Parameters: |
|
|---|
canonical_to_angle_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
canonical_to_angle_coords(orbit: pybmad._pybmad.CoordStruct, coord_type: str | None = None) -> None
Wrapper for Fortran routine canonical_to_angle_coords
| Parameters: |
|
|---|
cbar_to_c¶
Fortran source: bmad/modules/bmad_routine_interface.f90
cbar_to_c(cbar_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]], "FixedSize(2)"], a: pybmad._pybmad.TwissStruct, b: pybmad._pybmad.TwissStruct) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(2)"]], "FixedSize(2)"]
Wrapper for Fortran routine cbar_to_c
| Parameters: |
|
|---|
| Returns: |
|
|---|
check_aperture_limit¶
Fortran source: bmad/modules/bmad_routine_interface.f90
check_aperture_limit(orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, param: pybmad._pybmad.LatParamStruct, old_orb: pybmad._pybmad.CoordStruct | None = None, check_momentum: bool | None = None) -> None
Wrapper for Fortran routine check_aperture_limit
| Parameters: |
|
|---|
check_controller_controls¶
Fortran source: bmad/modules/bmad_routine_interface.f90
check_controller_controls(ele_key: typing.SupportsInt | typing.SupportsIndex, contrl: pybmad._pybmad.ControlStructArray1D, name: str) -> bool
Wrapper for Fortran routine check_controller_controls
| Parameters: |
|
|---|
| Returns: |
|
|---|
check_for_superimpose_problem¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
check_for_superimpose_problem(branch: pybmad._pybmad.BranchStruct, super_ele: pybmad._pybmad.EleStruct, err_flag: bool, wrap: bool, ref_ele: pybmad._pybmad.EleStruct | None = None) -> None
Subroutine check_for_superimpose_problem (branch, super_ele, err_flag, ref_ele, wrap)
Subroutine to check if there is a problem superimposing an element when there is multipass. In particular will check that: 1) If the ref_ele is part of a multipass region then super_ele must be superimposed within the region. Or: 2) If the ref_ele is not part of a multipass region then super_ele must also not be part of a multipass region.
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
check_if_s_in_bounds¶
Fortran source: bmad/modules/bmad_routine_interface.f90
check_if_s_in_bounds(branch: pybmad._pybmad.BranchStruct, s: typing.SupportsFloat | typing.SupportsIndex, print_err: bool | None = None) -> pybmad._pybmad.CheckIfSInBounds
Wrapper for Fortran routine check_if_s_in_bounds
| Parameters: |
|
|---|
| Returns: |
|
|---|
choose_quads_for_set_tune¶
Fortran source: bmad/modules/bmad_routine_interface.f90
choose_quads_for_set_tune(branch: pybmad._pybmad.BranchStruct, mask: str | None = None) -> pybmad._pybmad.ChooseQuadsForSetTune
Wrapper for Fortran routine choose_quads_for_set_tune
| Parameters: |
|
|---|
| Returns: |
|
|---|
chrom_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
chrom_calc(lat: pybmad._pybmad.LatStruct, delta_e: typing.SupportsFloat | typing.SupportsIndex, pz: typing.SupportsFloat | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, orb0: pybmad._pybmad.CoordStruct | None = None) -> pybmad._pybmad.ChromCalc
Wrapper for Fortran routine chrom_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
chrom_tune¶
Fortran source: bmad/modules/bmad_routine_interface.f90
chrom_tune(lat: pybmad._pybmad.LatStruct, delta_e: typing.SupportsFloat | typing.SupportsIndex, target_x: typing.SupportsFloat | typing.SupportsIndex, target_y: typing.SupportsFloat | typing.SupportsIndex, err_tol: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.ChromTune
Wrapper for Fortran routine chrom_tune
| Parameters: |
|
|---|
| Returns: |
|
|---|
classical_radius¶
Fortran source: bmad/modules/bmad_routine_interface.f90
classical_radius(species: typing.SupportsInt | typing.SupportsIndex) -> float
Wrapper for Fortran routine classical_radius
| Parameters: |
|
|---|
| Returns: |
|
|---|
clear_lat_1turn_mats¶
Fortran source: bmad/modules/bmad_routine_interface.f90
clear_lat_1turn_mats() -> pybmad._pybmad.LatStruct
Wrapper for Fortran routine clear_lat_1turn_mats
| Returns: |
|
|---|
clear_taylor_maps_from_elements¶
Fortran source: bmad/modules/bmad_routine_interface.f90
clear_taylor_maps_from_elements(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine clear_taylor_maps_from_elements
| Parameters: |
|
|---|
closed_orbit_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
closed_orbit_calc(lat: pybmad._pybmad.LatStruct, closed_orb: pybmad._pybmad.CoordStructAlloc1D, i_dim: typing.SupportsInt | typing.SupportsIndex | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, print_err: bool | None = None) -> bool
Wrapper for Fortran routine closed_orbit_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
closed_orbit_from_tracking¶
Fortran source: bmad/modules/bmad_routine_interface.f90
closed_orbit_from_tracking(lat: pybmad._pybmad.LatStruct, i_dim: typing.SupportsInt | typing.SupportsIndex, eps_rel: pybmad._pybmad.RealArray1D | None = None, eps_abs: pybmad._pybmad.RealArray1D | None = None, init_guess: pybmad._pybmad.CoordStruct | None = None) -> pybmad._pybmad.ClosedOrbitFromTracking
Wrapper for Fortran routine closed_orbit_from_tracking
| Parameters: |
|
|---|
| Returns: |
|
|---|
cmplx_re_str¶
Fortran source: bmad/output/write_lattice_file_mod.f90
cmplx_re_str(cmp: typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex, str_out: str) -> None
Wrapper for Fortran routine cmplx_re_str
| Parameters: |
|
|---|
combine_consecutive_elements¶
Fortran source: bmad/modules/bmad_routine_interface.f90
combine_consecutive_elements(lat: pybmad._pybmad.LatStruct) -> bool
Wrapper for Fortran routine combine_consecutive_elements
| Parameters: |
|
|---|
| Returns: |
|
|---|
complex_taylor_clean¶
Fortran source: bmad/modules/complex_taylor_mod.f90
complex_taylor_clean(complex_taylor: pybmad._pybmad.ComplexTaylorStruct) -> None
Wrapper for Fortran routine complex_taylor_clean
| Parameters: |
|
|---|
complex_taylor_coef¶
Fortran sources (overloaded):
complex_taylor_coef1:bmad/modules/complex_taylor_mod.f90complex_taylor_coef2:bmad/modules/complex_taylor_mod.f90
complex_taylor_coef(args, *kwargs) Overloaded function.
- complex_taylor_coef(complex_taylor: pybmad._pybmad.ComplexTaylorStruct, exp: pybmad._pybmad.IntArray1D, coef: typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex) -> None
Function complex_taylor_coef (complex_taylor, exp) Function complex_taylor_coef (complex_taylor, i1, i2, i3, i4, i5, i6, i7, i8, i9)
Function to return the coefficient for a particular complex_taylor term from a complex_taylor Series.
Note: complex_taylor_coef is overloaded by: complex_taylor_coef1 (complex_taylor, exp) complex_taylor_coef2 (complex_taylor, i1, i2, i3, i4, i5, i6, i7, i8, i9) Using the complex_taylor_coef2 form limits obtaining coefficients to 9th order or less. Also: complex_taylor_coef2 does not check that all i1, ..., i9 are between 1 and 6.
For example: To get the 2nd order term corresponding to y(out) = Coef * p_z(in)^2 [This is somtimes refered to as the T_366 term] The call would be: type (complex_taylor_struct) complex_taylor(6) ! complex_taylor Map ... coef = complex_taylor_coef (complex_taylor(3), 6, 6) ! 1st possibility or ... coef = complex_taylor_coef (complex_taylor(3), [0, 0, 0, 0, 0, 2 ])
Input (complex_taylor_coef1): complex_taylor -- complex_taylor_struct: complex_taylor series. exp(6) -- Integer: Array of exponent indices.
Input (complex_taylor_coef2): complex_taylor -- complex_taylor_struct: complex_taylor series. i1, ..., i9 -- Integer, optional: indexes (each between 1 and 6).
- complex_taylor_coef(complex_taylor: pybmad._pybmad.ComplexTaylorStruct, coef: typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex, i1: typing.SupportsInt | typing.SupportsIndex | None = None, i2: typing.SupportsInt | typing.SupportsIndex | None = None, i3: typing.SupportsInt | typing.SupportsIndex | None = None, i4: typing.SupportsInt | typing.SupportsIndex | None = None, i5: typing.SupportsInt | typing.SupportsIndex | None = None, i6: typing.SupportsInt | typing.SupportsIndex | None = None, i7: typing.SupportsInt | typing.SupportsIndex | None = None, i8: typing.SupportsInt | typing.SupportsIndex | None = None, i9: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Function complex_taylor_coef (complex_taylor, exp) Function complex_taylor_coef (complex_taylor, i1, i2, i3, i4, i5, i6, i7, i8, i9)
Function to return the coefficient for a particular complex_taylor term from a complex_taylor Series.
Note: complex_taylor_coef is overloaded by: complex_taylor_coef1 (complex_taylor, exp) complex_taylor_coef2 (complex_taylor, i1, i2, i3, i4, i5, i6, i7, i8, i9) Using the complex_taylor_coef2 form limits obtaining coefficients to 9th order or less. Also: complex_taylor_coef2 does not check that all i1, ..., i9 are between 1 and 6.
For example: To get the 2nd order term corresponding to y(out) = Coef * p_z(in)^2 [This is somtimes refered to as the T_366 term] The call would be: type (complex_taylor_struct) complex_taylor(6) ! complex_taylor Map ... coef = complex_taylor_coef (complex_taylor(3), 6, 6) ! 1st possibility or ... coef = complex_taylor_coef (complex_taylor(3), [0, 0, 0, 0, 0, 2 ])
Input (complex_taylor_coef1): complex_taylor -- complex_taylor_struct: complex_taylor series. exp(6) -- Integer: Array of exponent indices.
Input (complex_taylor_coef2): complex_taylor -- complex_taylor_struct: complex_taylor series. i1, ..., i9 -- Integer, optional: indexes (each between 1 and 6).
complex_taylor_equal_complex_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
complex_taylor_equal_complex_taylor(complex_taylor1: pybmad._pybmad.ComplexTaylorStruct, complex_taylor2: pybmad._pybmad.ComplexTaylorStruct) -> None
Wrapper for Fortran routine complex_taylor_equal_complex_taylor
| Parameters: |
|
|---|
complex_taylor_exponent_index¶
Fortran source: bmad/modules/complex_taylor_mod.f90
complex_taylor_exponent_index(expn: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(6)"]) -> int
Function complex_taylor_exponent_index(expn) result(index)
Function to associate a unique number with a complex_taylor exponent.
The number associated with a complex_taylor_term that is used for the sort is: number = sum(exp(i))10^6 + exp(6)10^5 + ... + exp(1)*10^0 where exp(1) is the exponent for x, exp(2) is the exponent for P_x, etc.
| Parameters: |
|
|---|
| Returns: |
|
|---|
complex_taylor_make_unit¶
Fortran source: bmad/modules/complex_taylor_mod.f90
complex_taylor_make_unit(complex_taylor: pybmad._pybmad.ComplexTaylorStructArray1D) -> None
Subroutine complex_taylor_make_unit (complex_taylor)
Subroutine to make the unit complex_taylor map: r(out) = Map * r(in) = r(in)
complex_taylor_to_mat6¶
Fortran source: bmad/modules/complex_taylor_mod.f90
complex_taylor_to_mat6(a_complex_taylor: pybmad._pybmad.ComplexTaylorStructArray1D, r_in: pybmad._pybmad.ComplexArray1D, r_out: pybmad._pybmad.ComplexArray1D | None = None) -> pybmad._pybmad.ComplexTaylorToMat6
Subroutine complex_taylor_to_mat6 (a_complex_taylor, r_in, vec0, mat6, r_out)
Subroutine to calculate, from a complex_taylor map and about some trajectory: The 1st order (Jacobian) transfer matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
complex_taylors_equal_complex_taylors¶
Fortran source: bmad/modules/bmad_routine_interface.f90
complex_taylors_equal_complex_taylors(complex_taylor1: pybmad._pybmad.ComplexTaylorStructArray1D, complex_taylor2: pybmad._pybmad.ComplexTaylorStructArray1D) -> None
Wrapper for Fortran routine complex_taylors_equal_complex_taylors
| Parameters: |
|
|---|
compute_slave_coupler¶
Fortran source: bmad/modules/bookkeeper_mod.f90
compute_slave_coupler(slave: pybmad._pybmad.EleStruct) -> None
Subroutine compute_slave_coupler (slave)
This routine is not meant for general use.
concat_ele_taylor¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
concat_ele_taylor(orb_taylor: pybmad._pybmad.TaylorStructArray1D, ele: pybmad._pybmad.EleStruct, spin_taylor: pybmad._pybmad.TaylorStructArray1D | None = None) -> bool
Subroutine concat_ele_taylor (orb_taylor, ele, err_flag, spin_taylor)
Routine to concatinate an orbital taylor map and, optionally if present and bmad_com%spin_tracking_on = T, a spin taylor map.
Transform: orb_taylor[x] -> ele_taylor(orb_taylor[x]) If ele%taylor_map_includes_offsets = True: ele_taylor == ele%taylor If ele%taylor_map_includes_offsets = False: ele_taylor == ele%taylor + offset corrections.
Also see: concat_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
concat_taylor¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
concat_taylor(taylor1: pybmad._pybmad.TaylorStructArray1D, taylor2: pybmad._pybmad.TaylorStructArray1D, taylor3: pybmad._pybmad.TaylorStructArray1D) -> None
Subroutine concat_taylor (taylor1, taylor2, taylor3)
Subroutine to concatinate two taylor maps: taylor3[x] = taylor2(taylor1[x])
Note: In general, if taylor2 is a component of an ele_struct, use concat_ele_taylor instead.
| Parameters: |
|
|---|
concat_transfer_mat¶
Fortran source: bmad/modules/transfer_map_mod.f90
concat_transfer_mat(mat_1: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], vec_1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat_0: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], vec_0: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]) -> pybmad._pybmad.ConcatTransferMat
Subroutine concat_transfer_mat (mat_1, vec_1, mat_0, vec_0, mat_out, vec_out)
Routine to concatinate two linear maps: mat_out = matmul(mat_1, mat_0) vec_out = matmul(mat_1, vec_0) + vec_1
| Parameters: |
|
|---|
| Returns: |
|
|---|
control_bookkeeper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
control_bookkeeper(lat: pybmad._pybmad.LatStruct, ele: pybmad._pybmad.EleStruct | None = None, err_flag: bool | None = None) -> None
Wrapper for Fortran routine control_bookkeeper
| Parameters: |
|---|
convert_bend_exact_multipole¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_bend_exact_multipole(g: typing.SupportsFloat | typing.SupportsIndex, out_type: typing.SupportsInt | typing.SupportsIndex, an: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(21)"], bn: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(21)"]) -> None
Wrapper for Fortran routine convert_bend_exact_multipole
| Parameters: |
|
|---|
convert_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_coords(in_type_str: str, coord_in: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.ConvertCoords
Wrapper for Fortran routine convert_coords
| Parameters: |
|
|---|
| Returns: |
|
|---|
convert_field_ele_to_lab¶
Fortran source: bmad/modules/em_field_mod.f90
convert_field_ele_to_lab(ele: pybmad._pybmad.EleStruct, s_here: typing.SupportsFloat | typing.SupportsIndex, forward_transform: bool, calc_dfield: bool | None = None, calc_potential: bool | None = None) -> pybmad._pybmad.EmFieldStruct
Subroutine convert_field_ele_to_lab (ele, s_here, forward_transform, field, calc_dfield, calc_potential)
Convert fields: ele to lab coords
| Parameters: |
|
|---|
| Returns: |
|
|---|
convert_local_cartesian_to_local_curvilinear¶
Fortran source: bmad/interface/gpt_interface_mod.f90
convert_local_cartesian_to_local_curvilinear(x: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex, g: typing.SupportsFloat | typing.SupportsIndex, xout: typing.SupportsFloat | typing.SupportsIndex, sout: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine convert_local_cartesian_to_local_curvilinear
| Parameters: |
|
|---|
convert_local_curvilinear_to_local_cartesian¶
Fortran source: bmad/interface/gpt_interface_mod.f90
convert_local_curvilinear_to_local_cartesian(x: typing.SupportsFloat | typing.SupportsIndex, s: typing.SupportsFloat | typing.SupportsIndex, g: typing.SupportsFloat | typing.SupportsIndex, xout: typing.SupportsFloat | typing.SupportsIndex, zout: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine convert_local_curvilinear_to_local_cartesian
| Parameters: |
|
|---|
convert_particle_coordinates_s_to_t¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_particle_coordinates_s_to_t(particle: pybmad._pybmad.CoordStruct, s_body: typing.SupportsFloat | typing.SupportsIndex, orientation: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine convert_particle_coordinates_s_to_t
| Parameters: |
|
|---|
convert_particle_coordinates_t_to_s¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_particle_coordinates_t_to_s(particle: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, use_downstream_p0c: bool | None = None) -> float
Wrapper for Fortran routine convert_particle_coordinates_t_to_s
| Parameters: |
|
|---|
| Returns: |
|
|---|
convert_pc_to¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_pc_to(pc: typing.SupportsFloat | typing.SupportsIndex, particle: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.ConvertPcTo
Wrapper for Fortran routine convert_pc_to
| Parameters: |
|
|---|
| Returns: |
|
|---|
convert_total_energy_to¶
Fortran source: bmad/modules/bmad_routine_interface.f90
convert_total_energy_to(E_tot: typing.SupportsFloat | typing.SupportsIndex, particle: typing.SupportsInt | typing.SupportsIndex, print_err: bool | None = None) -> pybmad._pybmad.ConvertTotalEnergyTo
Wrapper for Fortran routine convert_total_energy_to
| Parameters: |
|
|---|
| Returns: |
|
|---|
converter_distribution_parser¶
Fortran source: bmad/modules/bmad_routine_interface.f90
converter_distribution_parser(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.ConverterDistributionParser
Wrapper for Fortran routine converter_distribution_parser
| Parameters: |
|
|---|
| Returns: |
|
|---|
coord_equal_coord¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coord_equal_coord(coord2: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.CoordStruct
Subroutine coord_equal_coord (coord1, coord2)
Subroutine that is used to set one coord equal to another.
Note: This subroutine is called by the overloaded equal sign: coord1 = coord2
| Parameters: |
|
|---|
| Returns: |
|
|---|
coord_state_name¶
Fortran source: bmad/modules/bmad_struct.f90
coord_state_name(coord_state: typing.SupportsInt | typing.SupportsIndex, one_word: bool | None = None) -> str
Function coord_state_name (coord_state) result (state_str)
Routine to return the string representation of a coord%state state.
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_body_to_local¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_body_to_local(body_position: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, calculate_angles: bool | None = None) -> pybmad._pybmad.CoordsBodyToLocal
Wrapper for Fortran routine coords_body_to_local
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_body_to_rel_exit¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_body_to_rel_exit(body_position: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, calculate_angles: bool | None = None) -> pybmad._pybmad.CoordsBodyToRelExit
Wrapper for Fortran routine coords_body_to_rel_exit
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_curvilinear_to_floor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_curvilinear_to_floor(xys: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], branch: pybmad._pybmad.BranchStruct) -> pybmad._pybmad.CoordsCurvilinearToFloor
Wrapper for Fortran routine coords_curvilinear_to_floor
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_floor_to_curvilinear¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_floor_to_curvilinear(floor_coords: pybmad._pybmad.FloorPositionStruct, ele0: pybmad._pybmad.EleStruct) -> pybmad._pybmad.CoordsFloorToCurvilinear
Wrapper for Fortran routine coords_floor_to_curvilinear
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_floor_to_local_curvilinear¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_floor_to_local_curvilinear(global_position: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, relative_to: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.CoordsFloorToLocalCurvilinear
Wrapper for Fortran routine coords_floor_to_local_curvilinear
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_floor_to_relative¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_floor_to_relative(floor0: pybmad._pybmad.FloorPositionStruct, global_position: pybmad._pybmad.FloorPositionStruct, calculate_angles: bool | None = None, is_delta_position: bool | None = None) -> pybmad._pybmad.FloorPositionStruct
Wrapper for Fortran routine coords_floor_to_relative
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_local_curvilinear_to_body¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_local_curvilinear_to_body(local_position: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, calculate_angles: bool | None = None) -> pybmad._pybmad.CoordsLocalCurvilinearToBody
Wrapper for Fortran routine coords_local_curvilinear_to_body
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_local_curvilinear_to_floor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_local_curvilinear_to_floor(local_position: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, in_body_frame: bool | None = None, calculate_angles: bool | None = None, end_origin: typing.SupportsInt | typing.SupportsIndex | None = None, downstream_dir_ref: bool | None = None) -> pybmad._pybmad.CoordsLocalCurvilinearToFloor
Wrapper for Fortran routine coords_local_curvilinear_to_floor
| Parameters: |
|
|---|
| Returns: |
|
|---|
coords_relative_to_floor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
coords_relative_to_floor(floor0: pybmad._pybmad.FloorPositionStruct, dr: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], theta: typing.SupportsFloat | typing.SupportsIndex | None = None, phi: typing.SupportsFloat | typing.SupportsIndex | None = None, psi: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.FloorPositionStruct
Wrapper for Fortran routine coords_relative_to_floor
| Parameters: |
|
|---|
| Returns: |
|
|---|
coulombfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
coulombfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine coulombfun
| Parameters: |
|
|---|
create_concatenated_wall3d¶
Fortran source: bmad/modules/wall3d_mod.f90
create_concatenated_wall3d(lat: pybmad._pybmad.LatStruct, err: bool) -> None
Subroutine create_concatenated_wall3d (lat)
Routine to concatinate lat%branch(i)ele(:)%wall3d%section(:) arrays into one lat%branch(i)%wall3d%section(:) array.
Exceptions: capillary and aperture elements do not have their walls included.
Module needed: use wall3d_mod
| Parameters: |
|
|---|
create_element_slice¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_element_slice(ele_in: pybmad._pybmad.EleStruct, l_slice: typing.SupportsFloat | typing.SupportsIndex, offset: typing.SupportsFloat | typing.SupportsIndex, param: pybmad._pybmad.LatParamStruct, include_upstream_end: bool, include_downstream_end: bool, old_slice: pybmad._pybmad.EleStruct | None = None, orb_in: pybmad._pybmad.CoordStruct | None = None) -> pybmad._pybmad.CreateElementSlice
Wrapper for Fortran routine create_element_slice
| Parameters: |
|
|---|
| Returns: |
|
|---|
create_feedback¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_feedback(lord: pybmad._pybmad.EleStruct, input: pybmad._pybmad.CharacterAlloc1D, output: pybmad._pybmad.CharacterAlloc1D, err_flag: bool) -> None
Wrapper for Fortran routine create_feedback
| Parameters: |
|
|---|
create_field_overlap¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_field_overlap(lat: pybmad._pybmad.LatStruct, lord_name: str, slave_name: str) -> bool
Wrapper for Fortran routine create_field_overlap
| Parameters: |
|
|---|
| Returns: |
|
|---|
create_girder¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_girder(lat: pybmad._pybmad.LatStruct, ix_girder: typing.SupportsInt | typing.SupportsIndex, contrl: pybmad._pybmad.ControlStructArray1D, girder_info: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Wrapper for Fortran routine create_girder
| Parameters: |
|
|---|
create_group¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_group(lord: pybmad._pybmad.EleStruct, contrl: pybmad._pybmad.ControlStructArray1D, err: bool) -> None
Wrapper for Fortran routine create_group
| Parameters: |
|
|---|
create_lat_ele_nametable¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_lat_ele_nametable(lat: pybmad._pybmad.LatStruct) -> pybmad._pybmad.NametableStruct
Wrapper for Fortran routine create_lat_ele_nametable
| Parameters: |
|
|---|
| Returns: |
|
|---|
create_overlay¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_overlay(lord: pybmad._pybmad.EleStruct, contrl: pybmad._pybmad.ControlStructArray1D, err: bool) -> None
Wrapper for Fortran routine create_overlay
| Parameters: |
|
|---|
create_planar_wiggler_model¶
Fortran source: bmad/modules/element_modeling_mod.f90
create_planar_wiggler_model(wiggler_in: pybmad._pybmad.EleStruct, print_err: bool | None = None) -> pybmad._pybmad.CreatePlanarWigglerModel
Subroutine create_planar_wiggler_model (wiggler_in, lat, err_flag, print_err)
Routine to create series of bend and drift elements to serve as a replacement model for a planar wiggler.
This routine is helpful for translating bmad lattices to a language that does not implement the Bmad wiggler model.
This routine uses the mrqmin nonlinear optimizer to vary the parameters in the wiggler model to match: Integral g^2 (I_2 radiation integral) Integral g^3 (I_3 radiation integral) Transfer matrix. Also the endding horizontal transverse offset of the reference orbit (floor%r(1)) is matched to zero.
Note: The resulting model does not have the vertical cubic nonlinearity that the actual wiggler has.
| Parameters: |
|
|---|
| Returns: |
|
|---|
create_ramper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_ramper(lord: pybmad._pybmad.EleStruct, contrl: pybmad._pybmad.ControlStructArray1D, err: bool) -> None
Wrapper for Fortran routine create_ramper
| Parameters: |
|
|---|
create_sol_quad_model¶
Fortran source: bmad/modules/element_modeling_mod.f90
create_sol_quad_model(sol_quad: pybmad._pybmad.EleStruct, lat: pybmad._pybmad.LatStruct) -> None
Subroutine create_sol_quad_model (sol_quad, lat)
Routine to create series of solenoid and quadrupole elements to serve as a replacement model for a sol_quad element.
This routine is helpful for translating bmad lattices to a language that does not implement a combination solenoid/quadrupole.
Not yet implemented!
create_unique_ele_names¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_unique_ele_names(lat: pybmad._pybmad.LatStruct, key: typing.SupportsInt | typing.SupportsIndex, suffix: str) -> None
Wrapper for Fortran routine create_unique_ele_names
| Parameters: |
|
|---|
create_wiggler_cartesian_map¶
Fortran source: bmad/modules/bmad_routine_interface.f90
create_wiggler_cartesian_map(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.CartesianMapStruct
Wrapper for Fortran routine create_wiggler_cartesian_map
| Parameters: |
|
|---|
| Returns: |
|
|---|
crystal_attribute_bookkeeper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
crystal_attribute_bookkeeper(ele: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine crystal_attribute_bookkeeper
| Parameters: |
|
|---|
crystal_h_misalign¶
Fortran source: bmad/photon/track1_photon_mod.f90
crystal_h_misalign(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, h_vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> None
Subroutine crystal_h_misalign (ele, orbit, h_vec)
Routine reorient the crystal H vector due to local imperfections in the crystal lattice.
| Parameters: |
|
|---|
crystal_type_to_crystal_params¶
Fortran source: bmad/interface/xraylib_interface.f90
crystal_type_to_crystal_params(ele: pybmad._pybmad.EleStruct) -> bool
Subroutine crystal_type_to_crystal_params (ele, err_flag)
Routine to set the crystal parameters based upon the crystal type.
Crystal types are of the form: "ZZZ(ijk)" Where "ZZZ" is the atomic formula of the crystal material and "ijk" is the reciprical lattice vetor specifying the diffraction plans.
| Parameters: |
|
|---|
| Returns: |
|
|---|
custom_attribute_ubound_index¶
Fortran source: bmad/modules/attribute_mod.f90
custom_attribute_ubound_index(ele_class: typing.SupportsInt | typing.SupportsIndex) -> int
Function custom_attribute_ubound_index(ele_class) result (ix_ubound)
Routine to return, for a given element class, the upper bound index for the ele%custom(:) array which is needed to accomodate the registered custom attributes for that class.
| Parameters: |
|
|---|
| Returns: |
|
|---|
custom_ele_attrib_name_list¶
Fortran source: bmad/modules/attribute_mod.f90
custom_ele_attrib_name_list() -> pybmad._pybmad.CustomEleAttribNameList
Subroutine custom_ele_attrib_name_list (index_list, name_list)
Routine to create an array (index_list(i), name_list(i)) of custom element attribute names and indexes.
Each name in the name_list is of the form:
"{
| Returns: |
|
|---|
damping_matrix_d¶
Fortran source: bmad/multiparticle/envelope_mod.f90
damping_matrix_d(gamma: typing.SupportsFloat | typing.SupportsIndex, g_tot: typing.SupportsFloat | typing.SupportsIndex, B0: typing.SupportsFloat | typing.SupportsIndex, B1: typing.SupportsFloat | typing.SupportsIndex, delta: typing.SupportsFloat | typing.SupportsIndex, species: typing.SupportsInt | typing.SupportsIndex, mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> None
Wrapper for Fortran routine damping_matrix_d
| Parameters: |
|
|---|
deallocate_ele_pointers¶
Fortran source: bmad/modules/bmad_routine_interface.f90
deallocate_ele_pointers(ele: pybmad._pybmad.EleStruct, nullify_only: bool | None = None, nullify_branch: bool | None = None, dealloc_poles: bool | None = None) -> None
Wrapper for Fortran routine deallocate_ele_pointers
| Parameters: |
|
|---|
deallocate_expression_tree¶
Fortran source: bmad/modules/expression_mod.f90
deallocate_expression_tree(tree: pybmad._pybmad.ExpressionTreeStruct) -> None
Subroutine deallocate_expression_tree(tree)
Routine to deallocate an expression tree.
| Parameters: |
|
|---|
deallocate_lat_pointers¶
Fortran source: bmad/modules/bmad_routine_interface.f90
deallocate_lat_pointers(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine deallocate_lat_pointers
| Parameters: |
|
|---|
default_tracking_species¶
Fortran source: bmad/modules/bmad_routine_interface.f90
default_tracking_species(param: pybmad._pybmad.LatParamStruct) -> int
Wrapper for Fortran routine default_tracking_species
| Parameters: |
|
|---|
| Returns: |
|
|---|
detector_pixel_pt¶
Fortran source: bmad/photon/photon_target_mod.f90
detector_pixel_pt(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> typing.Annotated[list[int], "FixedSize(2)"]
Function detector_pixel_pt (orbit, ele) result (ix_pix)
Routine to return the pixel a particle is hitting.
| Parameters: |
|
|---|
| Returns: |
|
|---|
diffraction_plate_or_mask_hit_spot¶
Fortran source: bmad/modules/bmad_routine_interface.f90
diffraction_plate_or_mask_hit_spot(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct) -> int
Wrapper for Fortran routine diffraction_plate_or_mask_hit_spot
| Parameters: |
|
|---|
| Returns: |
|
|---|
diffusion_matrix_b¶
Fortran source: bmad/multiparticle/envelope_mod.f90
diffusion_matrix_b(gamma: typing.SupportsFloat | typing.SupportsIndex, g_tot: typing.SupportsFloat | typing.SupportsIndex, species: typing.SupportsInt | typing.SupportsIndex, mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> None
Wrapper for Fortran routine diffusion_matrix_b
| Parameters: |
|
|---|
distance_to_aperture¶
Fortran source: bmad/modules/bmad_routine_interface.f90
distance_to_aperture(orbit: pybmad._pybmad.CoordStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.DistanceToAperture
Wrapper for Fortran routine distance_to_aperture
| Parameters: |
|
|---|
| Returns: |
|
|---|
do_mode_flip¶
Fortran source: bmad/modules/bmad_routine_interface.f90
do_mode_flip(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine do_mode_flip
| Parameters: |
|
|---|
| Returns: |
|
|---|
dpc_given_de¶
Fortran source: bmad/modules/bmad_routine_interface.f90
dpc_given_de(pc_old: typing.SupportsFloat | typing.SupportsIndex, mass: typing.SupportsFloat | typing.SupportsIndex, dE: typing.SupportsFloat | typing.SupportsIndex, dpc: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine dpc_given_de
| Parameters: |
|
|---|
drift_and_pipe_track_methods_adjustment¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
drift_and_pipe_track_methods_adjustment(lat: pybmad._pybmad.LatStruct) -> None
Subroutine drift_and_pipe_track_methods_adjustment(lat)
Drift and pipe elements can be used in both photon and non-photon lines. A problem occures if, for example, a lattice file with both photon and non-photon lines contains a line like: drift::*[tracking_method] = taylor So this routine resets drift and pipe tracking_method and mat6_calc_method parameters in photon lines to bmad_standard if needed.
| Parameters: |
|
|---|
drift_multipass_name_correction¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
drift_multipass_name_correction(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine drift_multipass_name_correction
| Parameters: |
|
|---|
drift_orbit_time¶
Fortran source: bmad/modules/time_tracker_mod.f90
drift_orbit_time(orbit: pybmad._pybmad.CoordStruct, beta0: typing.SupportsFloat | typing.SupportsIndex, delta_s: typing.SupportsFloat | typing.SupportsIndex | None = None, delta_t: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Subroutine drift_orbit_time(orbit, beta0, delta_s, delta_t)
Simple routine to drift a particle orbit in time-based coordinates by a distance delta_s or a time delta_t If the particle has zero longitudinal velocity, then the particle is not drifted and a warning is printed.
| Parameters: |
|
|---|
drift_particle_to_s¶
Fortran source: bmad/space_charge/space_charge_mod.f90
drift_particle_to_s(p: pybmad._pybmad.CoordStruct, s: typing.SupportsFloat | typing.SupportsIndex, branch: pybmad._pybmad.BranchStruct) -> None
Subroutine drift_particle_to_s (p, s, branch)
Drift a particle to a given s-coordinate
| Parameters: |
|
|---|
drift_particle_to_t¶
Fortran source: bmad/space_charge/space_charge_mod.f90
drift_particle_to_t(p: pybmad._pybmad.CoordStruct, t: typing.SupportsFloat | typing.SupportsIndex, branch: pybmad._pybmad.BranchStruct) -> None
Subroutine drift_particle_to_t (p, t, branch)
Drift a particle to a given t-coordinate
| Parameters: |
|
|---|
dspline_len¶
Fortran source: bmad/space_charge/csr_and_space_charge_mod.f90
dspline_len(s_chord0: typing.SupportsFloat | typing.SupportsIndex, s_chord1: typing.SupportsFloat | typing.SupportsIndex, spline: pybmad._pybmad.SplineStruct, dtheta_ref: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Function dspline_len (s_chord0, s_chord1, spline, dtheta_ref) result (dlen)
Routine to calculate the difference in length between the spline curve length and a referece line. Referece line is centroid chord (referece system of the spline) rotated by dtheta_ref.
| Parameters: |
|
|---|
| Returns: |
|
|---|
dynamic_aperture_point¶
Fortran source: bmad/modules/dynamic_aperture_mod.f90
dynamic_aperture_point(branch: pybmad._pybmad.BranchStruct, ele0: pybmad._pybmad.EleStruct, orb0: pybmad._pybmad.CoordStruct, theta_xy: typing.SupportsFloat | typing.SupportsIndex, ap_param: pybmad._pybmad.ApertureParamStruct, check_xy_init: bool | None = None) -> pybmad._pybmad.AperturePointStruct
Subroutine dynamic_aperture_point (branch, ele0, orb0, theta_xy, ap_param, ap_point, check_xy_init)
Subroutine to determine one dynamic aperture point by tracking. This routine works by determining where on a radial line y = const * x the aperture is. Here x and y are deviations from the reference orbit.
| Parameters: |
|
|---|
| Returns: |
|
|---|
dynamic_aperture_scan¶
Fortran source: bmad/modules/dynamic_aperture_mod.f90
dynamic_aperture_scan(aperture_param: pybmad._pybmad.ApertureParamStruct, pz_start: pybmad._pybmad.RealArray1D, lat: pybmad._pybmad.LatStruct, print_timing: bool | None = None) -> pybmad._pybmad.ApertureScanStructAlloc1D
Subroutine dynamic_aperture_scan(aperture_scan, aperture_param, pz_start, lat, print_timing)
Routine to do a set of dynamic aperture scans.
| Parameters: |
|
|---|
| Returns: |
|
|---|
e_accel_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
e_accel_field(ele: pybmad._pybmad.EleStruct, voltage_or_gradient: typing.SupportsInt | typing.SupportsIndex, bmad_standard_tracking: bool | None = None) -> float
Wrapper for Fortran routine e_accel_field
| Parameters: |
|
|---|
| Returns: |
|
|---|
e_crit_photon¶
Fortran source: bmad/photon/photon_init_mod.f90
e_crit_photon(gamma: typing.SupportsFloat | typing.SupportsIndex, g_bend: typing.SupportsFloat | typing.SupportsIndex) -> float
Function E_crit_photon (gamma, g_bend) result (E_crit)
Routine to calculate the photon critical energy in a bend.
| Parameters: |
|
|---|
| Returns: |
|
|---|
eigen_decomp_6mat¶
Fortran source: bmad/modules/mode3_mod.f90
eigen_decomp_6mat(mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.EigenDecomp6mat
Subroutine eigen_decomp_6mat(mat, eval, evec, tunes, err_flag)
Compute eigenvalues and eigenvectors of a real 6x6 matrix. The evals and evecs are in general complex.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_compute_ref_energy_and_time¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_compute_ref_energy_and_time(ele0: pybmad._pybmad.EleStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, err_flag: bool) -> None
Wrapper for Fortran routine ele_compute_ref_energy_and_time
| Parameters: |
|
|---|
ele_equal_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_equals_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_equals_ele(ele_in: pybmad._pybmad.EleStruct, update_nametable: bool) -> pybmad._pybmad.EleStruct
Subroutine ele_equals_ele (ele_out, ele_in, update_nametable)
Subroutine that is used to set an element equal to another. Note: Use ele_equal_ele instead unless you know what you are doing.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_finalizer¶
Fortran source: bmad/modules/bmad_struct.f90
ele_finalizer(ele: pybmad._pybmad.EleStruct) -> None
Subroutine ele_finalizer(ele)
Finalizer routine for ele_struct instances. NOTE: Not currently used.
| Parameters: |
|
|---|
ele_full_name¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_full_name(ele: pybmad.pybmad.EleStruct, template: str | None = None) -> str
Wrapper for Fortran routine ele_full_name
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_geometry¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_geometry(floor_start: pybmad._pybmad.FloorPositionStruct, ele: pybmad._pybmad.EleStruct, len_scale: typing.SupportsFloat | typing.SupportsIndex | None = None, ignore_patch_err: bool | None = None) -> pybmad._pybmad.FloorPositionStruct
Wrapper for Fortran routine ele_geometry
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_geometry_with_misalignments¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_geometry_with_misalignments(ele: pybmad._pybmad.EleStruct, len_scale: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.FloorPositionStruct
Wrapper for Fortran routine ele_geometry_with_misalignments
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_has_constant_ds_dt_ref¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_has_constant_ds_dt_ref(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine ele_has_constant_ds_dt_ref
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_has_nonzero_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_has_nonzero_kick(ele: pybmad._pybmad.EleStruct, has_kick: bool) -> None
Wrapper for Fortran routine ele_has_nonzero_kick
| Parameters: |
|
|---|
ele_has_nonzero_offset¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_has_nonzero_offset(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine ele_has_nonzero_offset
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_is_monitor¶
Fortran source: bmad/modules/measurement_mod.f90
ele_is_monitor(ele: pybmad._pybmad.EleStruct, print_warning: bool | None = None) -> bool
Function ele_is_monitor (ele, print_warning) result (is_monitor)
Routine to check that an element is either a detector, instrument, monitor, or marker. These are the elements where measurement errors can be defined.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_loc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_loc(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.LatEleLocStruct
Wrapper for Fortran routine ele_loc
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_loc_name¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_loc_name(ele: pybmad._pybmad.EleStruct, show_branch0: bool | None = None, parens: str | None = None) -> str
Wrapper for Fortran routine ele_loc_name
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_misalignment_l_s_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_misalignment_l_s_calc(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.EleMisalignmentLSCalc
Wrapper for Fortran routine ele_misalignment_l_s_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_nametable_index¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_nametable_index(ele: pybmad._pybmad.EleStruct) -> int
Wrapper for Fortran routine ele_nametable_index
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_order_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_order_calc(lat: pybmad._pybmad.LatStruct) -> pybmad._pybmad.LatEleOrderStruct
Wrapper for Fortran routine ele_order_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_reference_energy_correction¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_reference_energy_correction(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine ele_reference_energy_correction
| Parameters: |
|
|---|
ele_rf_step_index¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_rf_step_index(E_ref: typing.SupportsFloat | typing.SupportsIndex, s_rel: typing.SupportsFloat | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct) -> int
Wrapper for Fortran routine ele_rf_step_index
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_to_fibre¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_to_fibre(ele: pybmad._pybmad.EleStruct, use_offsets: bool, integ_order: typing.SupportsInt | typing.SupportsIndex | None = None, steps: typing.SupportsInt | typing.SupportsIndex | None = None, for_layout: bool | None = None, ref_in: pybmad._pybmad.CoordStruct | None = None) -> pybmad._pybmad.EleToFibre
Wrapper for Fortran routine ele_to_fibre
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_to_ptc_magnetic_bn_an¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
ele_to_ptc_magnetic_bn_an(ele: pybmad._pybmad.EleStruct, bn: pybmad._pybmad.RealArray1D, an: pybmad._pybmad.RealArray1D) -> int
Subroutine ele_to_ptc_magnetic_bn_an (ele, bn, an, n_max)
Routine to compute the a(n) and b(n) magnetic multipole components of a magnet. This is used to interface between eles and PTC fibres
Note: The multipole index uses the PTC convention of starting from 1 instead of zero.
Note: On the PTC side bn(1) is error field when creating a fibre but is the total field when the fibre is being modified. This routine returns the error field.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_to_spin_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_to_spin_taylor(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orb0: pybmad._pybmad.CoordStruct) -> None
Wrapper for Fortran routine ele_to_spin_taylor
| Parameters: |
|
|---|
ele_to_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_to_taylor(ele: pybmad._pybmad.EleStruct, orb0: pybmad._pybmad.CoordStruct | None = None, taylor_map_includes_offsets: bool | None = None, include_damping: bool | None = None) -> pybmad._pybmad.EleToTaylor
Wrapper for Fortran routine ele_to_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_unique_name¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_unique_name(ele: pybmad._pybmad.EleStruct, order: pybmad._pybmad.LatEleOrderStruct) -> str
Wrapper for Fortran routine ele_unique_name
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_value_has_changed¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_value_has_changed(ele: pybmad._pybmad.EleStruct, list: pybmad._pybmad.IntArray1D, abs_tol: pybmad._pybmad.RealArray1D, set_old: bool) -> bool
Wrapper for Fortran routine ele_value_has_changed
| Parameters: |
|
|---|
| Returns: |
|
|---|
ele_vec_equal_ele_vec¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ele_vec_equal_ele_vec(ele1: pybmad._pybmad.EleStructArray1D, ele2: pybmad._pybmad.EleStructArray1D) -> None
Wrapper for Fortran routine ele_vec_equal_ele_vec
| Parameters: |
|
|---|
elec_multipole_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
elec_multipole_field(a: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex, coord: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.ElecMultipoleField
Wrapper for Fortran routine elec_multipole_field
| Parameters: |
|
|---|
| Returns: |
|
|---|
element_at_s¶
Fortran sources (overloaded):
element_at_s_branch:bmad/modules/element_at_s_mod.f90element_at_s_lat:bmad/modules/element_at_s_mod.f90
element_at_s(args, *kwargs) Overloaded function.
- element_at_s(branch: pybmad._pybmad.BranchStruct, s: typing.SupportsFloat | typing.SupportsIndex, choose_max: bool, print_err: bool | None = None) -> pybmad._pybmad.ElementAtSBranch
Function element_at_s (...) result (ix_ele)
Function to return the index of the element at position s.
element_at_s is an overloaded name for: function element_at_s_lat (lat, s, choose_max, ix_branch, err_flag, s_eff, position, print_err) result (ix_ele) function element_at_s_branch (branch, s, choose_max, err_flag, s_eff, position, print_err) result (ix_ele)
The differnce between these two routine is that with element_at_s_lat, the branch is given by the lat and ix_ele arguments: branch = lat%branch(ix_ele). With element_at_s_branch, the branch is an argument.
Also see: pointer_to_element_at_s
ix_ele is choisen such that: If choose_max = True: If s = branch%ele(ix_end_of_branch): ix_ele = ix_end_of_branch Else: branch%ele(ix_ele)%s_start <= s < branch%ele(ix_ele)%s If choose_max = False: If s = branch%ele(0)%s: ix_ele = 0 Else: branch%ele(ix_ele)%s_start < s <= branch%ele(ix_ele)%s That is, if s corresponds to an element boundary between elements with indexes ix1 and ix2 = ix1 + 1: choose_max = True => ix_ele = ix2 choose_max = False => ix_ele = ix1
The setting of choose_max only makes a difference when s corresponds to an element boundary.
Note: For a circular lattice, s is evaluated at the effective s which is modulo the branch length: s_eff = s - branch_length * floor(s/branch_length)
Note: If there are multiple elements that are at the given s position due to the presence of an element with a negative length, which of the possible elements is actually chosen is ill-defined.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
element_slice_iterator¶
Fortran source: bmad/modules/bmad_routine_interface.f90
element_slice_iterator(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, i_slice: typing.SupportsInt | typing.SupportsIndex, n_slice_tot: typing.SupportsInt | typing.SupportsIndex, sliced_ele: pybmad._pybmad.EleStruct, s_start: typing.SupportsFloat | typing.SupportsIndex | None = None, s_end: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine element_slice_iterator
| Parameters: |
|
|---|
ellipinc_test¶
Fortran source: bmad/space_charge/csr3d_mod.f90
ellipinc_test() -> None
Wrapper for Fortran routine ellipinc_test
em_field_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
em_field_calc(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, s_pos: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, local_ref_frame: bool, calc_dfield: bool | None = None, calc_potential: bool | None = None, use_overlap: bool | None = None, grid_allow_s_out_of_bounds: bool | None = None, rf_time: typing.SupportsFloat | typing.SupportsIndex | None = None, used_eles: pybmad._pybmad.ElePointerStructAlloc1D | None = None, print_err: bool | None = None, original_ele: pybmad._pybmad.EleStruct | None = None) -> pybmad._pybmad.EmFieldCalc
Wrapper for Fortran routine em_field_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
em_field_derivatives¶
Fortran source: bmad/modules/em_field_mod.f90
em_field_derivatives(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, s_pos: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, local_ref_frame: bool, grid_allow_s_out_of_bounds: bool | None = None, rf_time: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.EmFieldStruct
Subroutine em_field_derivatives (ele, param, s_pos, orbit, local_ref_frame, dfield, grid_allow_s_out_of_bounds, rf_time)
Routine to calculate field derivatives. In theory this should be handled by em_filed_calc. In practice, em_field_calc is currently incomplete.
| Parameters: |
|
|---|
| Returns: |
|
|---|
em_field_kick_vector_time¶
Fortran source: bmad/modules/time_tracker_mod.f90
em_field_kick_vector_time(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, rf_time: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, err_flag: bool, print_err: bool | None = None, extra_field: pybmad._pybmad.EmFieldStruct | None = None) -> typing.Annotated[list[float], "FixedSize(10)"]
Subroutine em_field_kick_vector_time (ele, param, rf_time, orbit, dvec_dt, err_flag, print_err, extra_field))
Subroutine to convert particle coordinates from t-based to s-based system.
| Parameters: |
|
|---|
| Returns: |
|
|---|
em_field_plus_em_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
em_field_plus_em_field(field1: pybmad._pybmad.EmFieldStruct, field2: pybmad._pybmad.EmFieldStruct, field_tot: pybmad._pybmad.EmFieldStruct) -> None
Wrapper for Fortran routine em_field_plus_em_field
| Parameters: |
|
|---|
emit_6d¶
Fortran source: bmad/modules/rad_6d_mod.f90
emit_6d(ele_ref: pybmad._pybmad.EleStruct, include_opening_angle: bool, closed_orbit: pybmad._pybmad.CoordStructArray1D | None = None) -> pybmad._pybmad.Emit6d
Subroutine emit_6d (ele_ref, include_opening_angle, mode, sigma_mat, closed_orbit, rad_int_by_ele)
Routine to calculate the three normal mode emittances, damping partition numbers, radiation integrals, etc. Since the emattances, etc. are only an invariant in the limit of zero damping, the calculated values will vary depending upon the reference element.
If the lattice geometry is open, only the radiation integrals is computed.
| Parameters: |
|
|---|
| Returns: |
|
|---|
entering_element¶
Fortran source: bmad/modules/bmad_routine_interface.f90
entering_element(orbit: pybmad._pybmad.CoordStruct, particle_at: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine entering_element
| Parameters: |
|
|---|
| Returns: |
|
|---|
envelope_radints¶
Fortran source: bmad/multiparticle/envelope_mod.f90
envelope_radints(Lambda: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Theta: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Iota: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], alpha: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], emit: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> None
subroutine envelope_radints(Lambda,Theta,Iota,alpha,emit)
Calculates damping decrement and emittance of the three normal modes from the integrate diffusion, damping, and vertical excitation matrices names Lambda, Theta, and Iota, respectively. These three matrices are obtained from the subroutine integrated_mats.
The damping times can obtained from alpha using: tau = lattice_length/c_light/alpha
envelope_radints_ibs¶
Fortran source: bmad/multiparticle/envelope_mod.f90
envelope_radints_ibs(Lambda: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Theta: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Iota: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], eles: pybmad._pybmad.EleStructArray1D, mode: pybmad._pybmad.NormalModesStruct, tail_cut: bool, npart: typing.SupportsFloat | typing.SupportsIndex, species: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.EnvelopeRadintsIbs
subroutine envelope_radints_ibs(Lambda, Theta, Iota, eles, alpha, emit, mode, tail_cut, npart, species)
Calculates damping decrement and emittance of the three normal modes by integrating the IBS, SR diffusion, and SR damping matrices.
The IBS depends on the envelope, and so this routine iterates to locate the equilibrium beam envelope. This iterative process can fail to converge.
The damping times can obtained from alpha using: tau = lattice_length/c_light/alpha
alpha and emit are quantities for the three normal modes. alpha and emit are ordered by plane dominance.
Only radiation from sbends and rbends is taken into account. The one-turn transfer matrix at each element (slice) is obtained by concatenating the individual element transfer matrices.
| Parameters: |
|
|---|
| Returns: |
|
|---|
eq_ac_kicker¶
Fortran source: bmad/modules/equality_mod.f90
eq_ac_kicker(f1: pybmad._pybmad.AcKickerStruct, f2: pybmad._pybmad.AcKickerStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_ac_kicker
| Parameters: |
|
|---|
eq_ac_kicker_freq¶
Fortran source: bmad/modules/equality_mod.f90
eq_ac_kicker_freq(f1: pybmad._pybmad.AcKickerFreqStruct, f2: pybmad._pybmad.AcKickerFreqStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_ac_kicker_freq
| Parameters: |
|
|---|
eq_ac_kicker_time¶
Fortran source: bmad/modules/equality_mod.f90
eq_ac_kicker_time(f1: pybmad._pybmad.AcKickerTimeStruct, f2: pybmad._pybmad.AcKickerTimeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_ac_kicker_time
| Parameters: |
|
|---|
eq_anormal_mode¶
Fortran source: bmad/modules/equality_mod.f90
eq_anormal_mode(f1: pybmad._pybmad.AnormalModeStruct, f2: pybmad._pybmad.AnormalModeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_anormal_mode
| Parameters: |
|
|---|
eq_aperture_param¶
Fortran source: bmad/modules/equality_mod.f90
eq_aperture_param(f1: pybmad._pybmad.ApertureParamStruct, f2: pybmad._pybmad.ApertureParamStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_aperture_param
| Parameters: |
|
|---|
eq_aperture_point¶
Fortran source: bmad/modules/equality_mod.f90
eq_aperture_point(f1: pybmad._pybmad.AperturePointStruct, f2: pybmad._pybmad.AperturePointStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_aperture_point
| Parameters: |
|
|---|
eq_aperture_scan¶
Fortran source: bmad/modules/equality_mod.f90
eq_aperture_scan(f1: pybmad._pybmad.ApertureScanStruct, f2: pybmad._pybmad.ApertureScanStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_aperture_scan
| Parameters: |
|
|---|
eq_beam¶
Fortran source: bmad/modules/equality_mod.f90
eq_beam(f1: pybmad._pybmad.BeamStruct, f2: pybmad._pybmad.BeamStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_beam
| Parameters: |
|
|---|
eq_beam_init¶
Fortran source: bmad/modules/equality_mod.f90
eq_beam_init(f1: pybmad._pybmad.BeamInitStruct, f2: pybmad._pybmad.BeamInitStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_beam_init
| Parameters: |
|
|---|
eq_bmad_common¶
Fortran source: bmad/modules/equality_mod.f90
eq_bmad_common(f1: pybmad._pybmad.BmadCommonStruct, f2: pybmad._pybmad.BmadCommonStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_bmad_common
| Parameters: |
|
|---|
eq_bookkeeping_state¶
Fortran source: bmad/modules/equality_mod.f90
eq_bookkeeping_state(f1: pybmad._pybmad.BookkeepingStateStruct, f2: pybmad._pybmad.BookkeepingStateStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_bookkeeping_state
| Parameters: |
|
|---|
eq_bpm_phase_coupling¶
Fortran source: bmad/modules/equality_mod.f90
eq_bpm_phase_coupling(f1: pybmad._pybmad.BpmPhaseCouplingStruct, f2: pybmad._pybmad.BpmPhaseCouplingStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_bpm_phase_coupling
| Parameters: |
|
|---|
eq_branch¶
Fortran source: bmad/modules/equality_mod.f90
eq_branch(f1: pybmad._pybmad.BranchStruct, f2: pybmad._pybmad.BranchStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_branch
| Parameters: |
|
|---|
eq_bunch¶
Fortran source: bmad/modules/equality_mod.f90
eq_bunch(f1: pybmad._pybmad.BunchStruct, f2: pybmad._pybmad.BunchStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_bunch
| Parameters: |
|
|---|
eq_bunch_params¶
Fortran source: bmad/modules/equality_mod.f90
eq_bunch_params(f1: pybmad._pybmad.BunchParamsStruct, f2: pybmad._pybmad.BunchParamsStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_bunch_params
| Parameters: |
|
|---|
eq_cartesian_map¶
Fortran source: bmad/modules/equality_mod.f90
eq_cartesian_map(f1: pybmad._pybmad.CartesianMapStruct, f2: pybmad._pybmad.CartesianMapStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cartesian_map
| Parameters: |
|
|---|
eq_cartesian_map_term¶
Fortran source: bmad/modules/equality_mod.f90
eq_cartesian_map_term(f1: pybmad._pybmad.CartesianMapTermStruct, f2: pybmad._pybmad.CartesianMapTermStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cartesian_map_term
| Parameters: |
|
|---|
eq_cartesian_map_term1¶
Fortran source: bmad/modules/equality_mod.f90
eq_cartesian_map_term1(f1: pybmad._pybmad.CartesianMapTerm1Struct, f2: pybmad._pybmad.CartesianMapTerm1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cartesian_map_term1
| Parameters: |
|
|---|
eq_complex_taylor¶
Fortran source: bmad/modules/equality_mod.f90
eq_complex_taylor(f1: pybmad._pybmad.ComplexTaylorStruct, f2: pybmad._pybmad.ComplexTaylorStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_complex_taylor
| Parameters: |
|
|---|
eq_complex_taylor_term¶
Fortran source: bmad/modules/equality_mod.f90
eq_complex_taylor_term(f1: pybmad._pybmad.ComplexTaylorTermStruct, f2: pybmad._pybmad.ComplexTaylorTermStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_complex_taylor_term
| Parameters: |
|
|---|
eq_control¶
Fortran source: bmad/modules/equality_mod.f90
eq_control(f1: pybmad._pybmad.ControlStruct, f2: pybmad._pybmad.ControlStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_control
| Parameters: |
|
|---|
eq_control_ramp1¶
Fortran source: bmad/modules/equality_mod.f90
eq_control_ramp1(f1: pybmad._pybmad.ControlRamp1Struct, f2: pybmad._pybmad.ControlRamp1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_control_ramp1
| Parameters: |
|
|---|
eq_control_var1¶
Fortran source: bmad/modules/equality_mod.f90
eq_control_var1(f1: pybmad._pybmad.ControlVar1Struct, f2: pybmad._pybmad.ControlVar1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_control_var1
| Parameters: |
|
|---|
eq_controller¶
Fortran source: bmad/modules/equality_mod.f90
eq_controller(f1: pybmad._pybmad.ControllerStruct, f2: pybmad._pybmad.ControllerStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_controller
| Parameters: |
|
|---|
eq_coord¶
Fortran source: bmad/modules/equality_mod.f90
eq_coord(f1: pybmad._pybmad.CoordStruct, f2: pybmad._pybmad.CoordStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_coord
| Parameters: |
|
|---|
eq_coord_array¶
Fortran source: bmad/modules/equality_mod.f90
eq_coord_array(f1: pybmad._pybmad.CoordArrayStruct, f2: pybmad._pybmad.CoordArrayStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_coord_array
| Parameters: |
|
|---|
eq_cylindrical_map¶
Fortran source: bmad/modules/equality_mod.f90
eq_cylindrical_map(f1: pybmad._pybmad.CylindricalMapStruct, f2: pybmad._pybmad.CylindricalMapStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cylindrical_map
| Parameters: |
|
|---|
eq_cylindrical_map_term¶
Fortran source: bmad/modules/equality_mod.f90
eq_cylindrical_map_term(f1: pybmad._pybmad.CylindricalMapTermStruct, f2: pybmad._pybmad.CylindricalMapTermStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cylindrical_map_term
| Parameters: |
|
|---|
eq_cylindrical_map_term1¶
Fortran source: bmad/modules/equality_mod.f90
eq_cylindrical_map_term1(f1: pybmad._pybmad.CylindricalMapTerm1Struct, f2: pybmad._pybmad.CylindricalMapTerm1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_cylindrical_map_term1
| Parameters: |
|
|---|
eq_ele¶
Fortran source: bmad/modules/equality_mod.f90
eq_ellipse_beam_init¶
Fortran source: bmad/modules/equality_mod.f90
eq_ellipse_beam_init(f1: pybmad._pybmad.EllipseBeamInitStruct, f2: pybmad._pybmad.EllipseBeamInitStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_ellipse_beam_init
| Parameters: |
|
|---|
eq_em_field¶
Fortran source: bmad/modules/equality_mod.f90
eq_em_field(f1: pybmad._pybmad.EmFieldStruct, f2: pybmad._pybmad.EmFieldStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_em_field
| Parameters: |
|
|---|
eq_expression_atom¶
Fortran source: bmad/modules/equality_mod.f90
eq_expression_atom(f1: pybmad._pybmad.ExpressionAtomStruct, f2: pybmad._pybmad.ExpressionAtomStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_expression_atom
| Parameters: |
|
|---|
eq_floor_position¶
Fortran source: bmad/modules/equality_mod.f90
eq_floor_position(f1: pybmad._pybmad.FloorPositionStruct, f2: pybmad._pybmad.FloorPositionStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_floor_position
| Parameters: |
|
|---|
eq_gen_grad1¶
Fortran source: bmad/modules/equality_mod.f90
eq_gen_grad1(f1: pybmad._pybmad.GenGrad1Struct, f2: pybmad._pybmad.GenGrad1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_gen_grad1
| Parameters: |
|
|---|
eq_gen_grad_map¶
Fortran source: bmad/modules/equality_mod.f90
eq_gen_grad_map(f1: pybmad._pybmad.GenGradMapStruct, f2: pybmad._pybmad.GenGradMapStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_gen_grad_map
| Parameters: |
|
|---|
eq_gg_taylor¶
Fortran source: bmad/modules/equality_mod.f90
eq_gg_taylor(f1: pybmad._pybmad.GgTaylorStruct, f2: pybmad._pybmad.GgTaylorStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_gg_taylor
| Parameters: |
|
|---|
eq_gg_taylor_term¶
Fortran source: bmad/modules/equality_mod.f90
eq_gg_taylor_term(f1: pybmad._pybmad.GgTaylorTermStruct, f2: pybmad._pybmad.GgTaylorTermStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_gg_taylor_term
| Parameters: |
|
|---|
eq_grid_beam_init¶
Fortran source: bmad/modules/equality_mod.f90
eq_grid_beam_init(f1: pybmad._pybmad.GridBeamInitStruct, f2: pybmad._pybmad.GridBeamInitStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_grid_beam_init
| Parameters: |
|
|---|
eq_grid_field¶
Fortran source: bmad/modules/equality_mod.f90
eq_grid_field(f1: pybmad._pybmad.GridFieldStruct, f2: pybmad._pybmad.GridFieldStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_grid_field
| Parameters: |
|
|---|
eq_grid_field_pt¶
Fortran source: bmad/modules/equality_mod.f90
eq_grid_field_pt(f1: pybmad._pybmad.GridFieldPtStruct, f2: pybmad._pybmad.GridFieldPtStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_grid_field_pt
| Parameters: |
|
|---|
eq_grid_field_pt1¶
Fortran source: bmad/modules/equality_mod.f90
eq_grid_field_pt1(f1: pybmad._pybmad.GridFieldPt1Struct, f2: pybmad._pybmad.GridFieldPt1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_grid_field_pt1
| Parameters: |
|
|---|
eq_high_energy_space_charge¶
Fortran source: bmad/modules/equality_mod.f90
eq_high_energy_space_charge(f1: pybmad._pybmad.HighEnergySpaceChargeStruct, f2: pybmad._pybmad.HighEnergySpaceChargeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_high_energy_space_charge
| Parameters: |
|
|---|
eq_interval1_coef¶
Fortran source: bmad/modules/equality_mod.f90
eq_interval1_coef(f1: pybmad._pybmad.Interval1CoefStruct, f2: pybmad._pybmad.Interval1CoefStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_interval1_coef
| Parameters: |
|
|---|
eq_kv_beam_init¶
Fortran source: bmad/modules/equality_mod.f90
eq_kv_beam_init(f1: pybmad._pybmad.KvBeamInitStruct, f2: pybmad._pybmad.KvBeamInitStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_kv_beam_init
| Parameters: |
|
|---|
eq_lat¶
Fortran source: bmad/modules/equality_mod.f90
eq_lat_ele_loc¶
Fortran source: bmad/modules/equality_mod.f90
eq_lat_ele_loc(f1: pybmad._pybmad.LatEleLocStruct, f2: pybmad._pybmad.LatEleLocStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_lat_ele_loc
| Parameters: |
|
|---|
eq_lat_param¶
Fortran source: bmad/modules/equality_mod.f90
eq_lat_param(f1: pybmad._pybmad.LatParamStruct, f2: pybmad._pybmad.LatParamStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_lat_param
| Parameters: |
|
|---|
eq_linac_normal_mode¶
Fortran source: bmad/modules/equality_mod.f90
eq_linac_normal_mode(f1: pybmad._pybmad.LinacNormalModeStruct, f2: pybmad._pybmad.LinacNormalModeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_linac_normal_mode
| Parameters: |
|
|---|
eq_mode3¶
Fortran source: bmad/modules/equality_mod.f90
eq_mode3(f1: pybmad._pybmad.Mode3Struct, f2: pybmad._pybmad.Mode3Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_mode3
| Parameters: |
|
|---|
eq_mode_info¶
Fortran source: bmad/modules/equality_mod.f90
eq_mode_info(f1: pybmad._pybmad.ModeInfoStruct, f2: pybmad._pybmad.ModeInfoStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_mode_info
| Parameters: |
|
|---|
eq_normal_modes¶
Fortran source: bmad/modules/equality_mod.f90
eq_normal_modes(f1: pybmad._pybmad.NormalModesStruct, f2: pybmad._pybmad.NormalModesStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_normal_modes
| Parameters: |
|
|---|
eq_photon_element¶
Fortran source: bmad/modules/equality_mod.f90
eq_photon_element(f1: pybmad._pybmad.PhotonElementStruct, f2: pybmad._pybmad.PhotonElementStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_photon_element
| Parameters: |
|
|---|
eq_photon_material¶
Fortran source: bmad/modules/equality_mod.f90
eq_photon_material(f1: pybmad._pybmad.PhotonMaterialStruct, f2: pybmad._pybmad.PhotonMaterialStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_photon_material
| Parameters: |
|
|---|
eq_photon_reflect_surface¶
Fortran source: bmad/modules/equality_mod.f90
eq_photon_reflect_surface(f1: pybmad._pybmad.PhotonReflectSurfaceStruct, f2: pybmad._pybmad.PhotonReflectSurfaceStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_photon_reflect_surface
| Parameters: |
|
|---|
eq_photon_reflect_table¶
Fortran source: bmad/modules/equality_mod.f90
eq_photon_reflect_table(f1: pybmad._pybmad.PhotonReflectTableStruct, f2: pybmad._pybmad.PhotonReflectTableStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_photon_reflect_table
| Parameters: |
|
|---|
eq_photon_target¶
Fortran source: bmad/modules/equality_mod.f90
eq_photon_target(f1: pybmad._pybmad.PhotonTargetStruct, f2: pybmad._pybmad.PhotonTargetStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_photon_target
| Parameters: |
|
|---|
eq_pixel_detec¶
Fortran source: bmad/modules/equality_mod.f90
eq_pixel_detec(f1: pybmad._pybmad.PixelDetecStruct, f2: pybmad._pybmad.PixelDetecStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_pixel_detec
| Parameters: |
|
|---|
eq_pixel_pt¶
Fortran source: bmad/modules/equality_mod.f90
eq_pixel_pt(f1: pybmad._pybmad.PixelPtStruct, f2: pybmad._pybmad.PixelPtStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_pixel_pt
| Parameters: |
|
|---|
eq_pre_tracker¶
Fortran source: bmad/modules/equality_mod.f90
eq_pre_tracker(f1: pybmad._pybmad.PreTrackerStruct, f2: pybmad._pybmad.PreTrackerStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_pre_tracker
| Parameters: |
|
|---|
eq_rad_int1¶
Fortran source: bmad/modules/equality_mod.f90
eq_rad_int1(f1: pybmad._pybmad.RadInt1Struct, f2: pybmad._pybmad.RadInt1Struct, is_eq: bool) -> None
Wrapper for Fortran routine eq_rad_int1
| Parameters: |
|
|---|
eq_rad_int_all_ele¶
Fortran source: bmad/modules/equality_mod.f90
eq_rad_int_all_ele(f1: pybmad._pybmad.RadIntAllEleStruct, f2: pybmad._pybmad.RadIntAllEleStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_rad_int_all_ele
| Parameters: |
|
|---|
eq_rad_int_branch¶
Fortran source: bmad/modules/equality_mod.f90
eq_rad_int_branch(f1: pybmad._pybmad.RadIntBranchStruct, f2: pybmad._pybmad.RadIntBranchStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_rad_int_branch
| Parameters: |
|
|---|
eq_rad_map¶
Fortran source: bmad/modules/equality_mod.f90
eq_rad_map(f1: pybmad._pybmad.RadMapStruct, f2: pybmad._pybmad.RadMapStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_rad_map
| Parameters: |
|
|---|
eq_rad_map_ele¶
Fortran source: bmad/modules/equality_mod.f90
eq_rad_map_ele(f1: pybmad._pybmad.RadMapEleStruct, f2: pybmad._pybmad.RadMapEleStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_rad_map_ele
| Parameters: |
|
|---|
eq_ramper_lord¶
Fortran source: bmad/modules/equality_mod.f90
eq_ramper_lord(f1: pybmad._pybmad.RamperLordStruct, f2: pybmad._pybmad.RamperLordStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_ramper_lord
| Parameters: |
|
|---|
eq_space_charge_common¶
Fortran source: bmad/modules/equality_mod.f90
eq_space_charge_common(f1: pybmad._pybmad.SpaceChargeCommonStruct, f2: pybmad._pybmad.SpaceChargeCommonStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_space_charge_common
| Parameters: |
|
|---|
eq_spin_polar¶
Fortran source: bmad/modules/equality_mod.f90
eq_spin_polar(f1: pybmad._pybmad.SpinPolarStruct, f2: pybmad._pybmad.SpinPolarStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_spin_polar
| Parameters: |
|
|---|
eq_spline¶
Fortran source: bmad/modules/equality_mod.f90
eq_spline(f1: pybmad._pybmad.SplineStruct, f2: pybmad._pybmad.SplineStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_spline
| Parameters: |
|
|---|
eq_strong_beam¶
Fortran source: bmad/modules/equality_mod.f90
eq_strong_beam(f1: pybmad._pybmad.StrongBeamStruct, f2: pybmad._pybmad.StrongBeamStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_strong_beam
| Parameters: |
|
|---|
eq_surface_curvature¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_curvature(f1: pybmad._pybmad.SurfaceCurvatureStruct, f2: pybmad._pybmad.SurfaceCurvatureStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_curvature
| Parameters: |
|
|---|
eq_surface_displacement¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_displacement(f1: pybmad._pybmad.SurfaceDisplacementStruct, f2: pybmad._pybmad.SurfaceDisplacementStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_displacement
| Parameters: |
|
|---|
eq_surface_displacement_pt¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_displacement_pt(f1: pybmad._pybmad.SurfaceDisplacementPtStruct, f2: pybmad._pybmad.SurfaceDisplacementPtStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_displacement_pt
| Parameters: |
|
|---|
eq_surface_h_misalign¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_h_misalign(f1: pybmad._pybmad.SurfaceHMisalignStruct, f2: pybmad._pybmad.SurfaceHMisalignStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_h_misalign
| Parameters: |
|
|---|
eq_surface_h_misalign_pt¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_h_misalign_pt(f1: pybmad._pybmad.SurfaceHMisalignPtStruct, f2: pybmad._pybmad.SurfaceHMisalignPtStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_h_misalign_pt
| Parameters: |
|
|---|
eq_surface_segmented¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_segmented(f1: pybmad._pybmad.SurfaceSegmentedStruct, f2: pybmad._pybmad.SurfaceSegmentedStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_segmented
| Parameters: |
|
|---|
eq_surface_segmented_pt¶
Fortran source: bmad/modules/equality_mod.f90
eq_surface_segmented_pt(f1: pybmad._pybmad.SurfaceSegmentedPtStruct, f2: pybmad._pybmad.SurfaceSegmentedPtStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_surface_segmented_pt
| Parameters: |
|
|---|
eq_target_point¶
Fortran source: bmad/modules/equality_mod.f90
eq_target_point(f1: pybmad._pybmad.TargetPointStruct, f2: pybmad._pybmad.TargetPointStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_target_point
| Parameters: |
|
|---|
eq_taylor¶
Fortran source: bmad/modules/equality_mod.f90
eq_taylor(f1: pybmad._pybmad.TaylorStruct, f2: pybmad._pybmad.TaylorStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_taylor
| Parameters: |
|
|---|
eq_taylor_term¶
Fortran source: bmad/modules/equality_mod.f90
eq_taylor_term(f1: pybmad._pybmad.TaylorTermStruct, f2: pybmad._pybmad.TaylorTermStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_taylor_term
| Parameters: |
|
|---|
eq_track¶
Fortran source: bmad/modules/equality_mod.f90
eq_track(f1: pybmad._pybmad.TrackStruct, f2: pybmad._pybmad.TrackStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_track
| Parameters: |
|
|---|
eq_track_point¶
Fortran source: bmad/modules/equality_mod.f90
eq_track_point(f1: pybmad._pybmad.TrackPointStruct, f2: pybmad._pybmad.TrackPointStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_track_point
| Parameters: |
|
|---|
eq_twiss¶
Fortran source: bmad/modules/equality_mod.f90
eq_twiss(f1: pybmad._pybmad.TwissStruct, f2: pybmad._pybmad.TwissStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_twiss
| Parameters: |
|
|---|
eq_wake¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake(f1: pybmad._pybmad.WakeStruct, f2: pybmad._pybmad.WakeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake
| Parameters: |
|
|---|
eq_wake_lr¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake_lr(f1: pybmad._pybmad.WakeLrStruct, f2: pybmad._pybmad.WakeLrStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake_lr
| Parameters: |
|
|---|
eq_wake_lr_mode¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake_lr_mode(f1: pybmad._pybmad.WakeLrModeStruct, f2: pybmad._pybmad.WakeLrModeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake_lr_mode
| Parameters: |
|
|---|
eq_wake_sr¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake_sr(f1: pybmad._pybmad.WakeSrStruct, f2: pybmad._pybmad.WakeSrStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake_sr
| Parameters: |
|
|---|
eq_wake_sr_mode¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake_sr_mode(f1: pybmad._pybmad.WakeSrModeStruct, f2: pybmad._pybmad.WakeSrModeStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake_sr_mode
| Parameters: |
|
|---|
eq_wake_sr_z_long¶
Fortran source: bmad/modules/equality_mod.f90
eq_wake_sr_z_long(f1: pybmad._pybmad.WakeSrZLongStruct, f2: pybmad._pybmad.WakeSrZLongStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wake_sr_z_long
| Parameters: |
|
|---|
eq_wall3d¶
Fortran source: bmad/modules/equality_mod.f90
eq_wall3d(f1: pybmad._pybmad.Wall3DStruct, f2: pybmad._pybmad.Wall3DStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wall3d
| Parameters: |
|
|---|
eq_wall3d_section¶
Fortran source: bmad/modules/equality_mod.f90
eq_wall3d_section(f1: pybmad._pybmad.Wall3DSectionStruct, f2: pybmad._pybmad.Wall3DSectionStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wall3d_section
| Parameters: |
|
|---|
eq_wall3d_vertex¶
Fortran source: bmad/modules/equality_mod.f90
eq_wall3d_vertex(f1: pybmad._pybmad.Wall3DVertexStruct, f2: pybmad._pybmad.Wall3DVertexStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_wall3d_vertex
| Parameters: |
|
|---|
eq_xy_disp¶
Fortran source: bmad/modules/equality_mod.f90
eq_xy_disp(f1: pybmad._pybmad.XyDispStruct, f2: pybmad._pybmad.XyDispStruct, is_eq: bool) -> None
Wrapper for Fortran routine eq_xy_disp
| Parameters: |
|
|---|
equal_sign_here¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
equal_sign_here(ele: pybmad._pybmad.EleStruct, delim: str, is_here: bool) -> None
Wrapper for Fortran routine equal_sign_here
| Parameters: |
|
|---|
equivalent_taylor_attributes¶
Fortran source: bmad/modules/bmad_routine_interface.f90
equivalent_taylor_attributes(ele_taylor: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine equivalent_taylor_attributes
| Parameters: |
|---|
| Returns: |
|
|---|
etdiv¶
Fortran source: bmad/multiparticle/envelope_mod.f90
etdiv(A: typing.SupportsFloat | typing.SupportsIndex, B: typing.SupportsFloat | typing.SupportsIndex, C: typing.SupportsFloat | typing.SupportsIndex, D: typing.SupportsFloat | typing.SupportsIndex, E: typing.SupportsFloat | typing.SupportsIndex, F: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine etdiv
| Parameters: |
|
|---|
evaluate_array_index¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
evaluate_array_index(delim_list1: str, delim_list2: str) -> pybmad._pybmad.EvaluateArrayIndex
Function evaluate_array_index (err_flag, delim_list1, word2, delim_list2, delim2) result (this_index)
Function of evaluate the index of an array. Typically the text being parsed looks like: "5) = ..." or "6).COMP = ..."
| Parameters: |
|
|---|
| Returns: |
|
|---|
evaluate_logical¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
evaluate_logical(word: str) -> pybmad._pybmad.EvaluateLogical
Function evaluate_logical (word, iostat) result (this_logic)
Function of convert a string into a logical value. Accepted possibilities are: .TRUE. .FALSE. TRUE FALSE T F
| Parameters: |
|
|---|
| Returns: |
|
|---|
exact_bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
exact_bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix)
Subroutine to track through the edge field of an sbend. Uses routines adapted from PTC
| Parameters: |
|
|---|
exp_bessi0¶
Fortran source: bmad/multiparticle/touschek_mod.f90
exp_bessi0(t: typing.SupportsFloat | typing.SupportsIndex, B1: typing.SupportsFloat | typing.SupportsIndex, B2: typing.SupportsFloat | typing.SupportsIndex, func_retval__: typing.SupportsFloat | typing.SupportsIndex) -> None
Function exp_bessi0(t, B1, B2)
This is essentially the Numercal Recipes bessi0 function multiplied by exp(-B1*t).
This overcomes an issue where exp(B2t) may be huge and exp(-B1t) may be small. Evaluating exp(B2t) may result in overflow, but exp((B2-B1)t) has a moderate value. Simplifying the algebra of B2-B1 suggests that is should always have a moderate magnitude.
| Parameters: |
|
|---|
expect_one_of¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
expect_one_of(delim_list: str, check_input_delim: bool, ele_name: str, delim: str, delim_found: bool, is_ok: bool) -> pybmad._pybmad.ExpectOneOf
Function expect_one_of (delim_list, check_input_delim, ele_name, delim, delim_found) result (is_ok)
Routine to check either that the current delimitor or the next character in the parse stream is the expected delimitor. This routine is used for Bmad lattice file parsing and is not meant for general use.
Also see: expect_this
| Parameters: |
|
|---|
| Returns: |
|
|---|
expect_this¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
expect_this(expecting: str, check_delim: bool, call_check: bool, err_str: str, ele: pybmad._pybmad.EleStruct, is_ok: bool) -> pybmad._pybmad.ExpectThis
Function expect_this (expecting, check_delim, call_check, err_str, ele, delim, delim_found) result (is_ok)
Checks that the next character or characters in the parse stream corresponds to the characters in the expecting argument. For example, if expecting is ')={' these three characters should be the next non-blank characters in the parse stream.
Also see: expect_one_of
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_stack_to_string¶
Fortran source: bmad/modules/expression_mod.f90
expression_stack_to_string(stack: pybmad._pybmad.ExpressionAtomStructArray1D, polish: bool | None = None) -> str
Function expression_stack_to_string (stack, polish) result (str)
Routine to convert an expression stack to a string
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_stack_value¶
Fortran source: bmad/modules/expression_mod.f90
expression_stack_value(stack: pybmad._pybmad.ExpressionAtomStructArray1D, var: pybmad._pybmad.ControlVar1StructArray1D | None = None, use_old: bool | None = None) -> pybmad._pybmad.ExpressionStackValue
Function expression_stack_value (stack, err_flag, err_str, var, use_old) result (value)
Routine to evaluate a mathematical expression represented by an "expression stack". Expression stacks are created by expression_string_to_stack.
Note: Stack elements with stack(i)%type == variable$ need to be evalauated before calling this routine and the value placed in stack(i)%value.
Also see: expression_value expression_string_to_stack
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_string_to_stack¶
Fortran source: bmad/modules/expression_mod.f90
expression_string_to_stack(string: str) -> pybmad._pybmad.ExpressionStringToStack
Subroutine expression_string_to_stack (string, stack, n_stack, err_flag, err_str)
This routine creates an expression stack array which can be used to evaluate an arithmethic expression.
Stack end elements not used are marked stack(i)%type = end_stack$
Stack elements with stack(i)%type = variable$ are elements that need to be evaluated before calling expression_stack_value.
Also see: expression_value expression_stack_value
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_string_to_tree¶
Fortran source: bmad/modules/expression_mod.f90
expression_string_to_tree(string: str, root_tree: pybmad._pybmad.ExpressionTreeStruct) -> pybmad._pybmad.ExpressionStringToTree
Subroutine expression_string_to_tree (string, root_tree, err_flag, err_str)
Routine to create an expression tree array which can be used to evaluate an arithmethic expression.
Also see: expression_value expression_tree_value deallocate_expression_tree
Important! trees use pointers as opposed to allocatable arrays due to the ifort compiler not being able to handle node%node(:) being an allocatable array. Thus deallocate_expression_tree must be called before any tree instance goes out of scope.
Note types used: plus\(, minus\), times\(, divide\), power\(, unary_minus\), unary_plus$ constant\(, numeric\), variable\(, function\) root\(, parens\), func_parens\(, square_brackets\), curly_brackets$ arrow\(, equal\), colon\(, double_colon\), vertical_bar\(, compound\)
An expression string will be split on: Two character operators: "->", "::" operators: + - * / ^ = : & brackets: [] () {} comma: ,
Root node name is "root" and is of type root$ Brackets in the expression string must be matched. The corresponding tree node will have a name / type of: "[]" / square_brackets\(, "()" / parens\) or func_parens\(, "{}" / curley_brackets\)
The root node, equal nodes, and all bracket nodes, will have an array of child nodes all of which will be comma nodes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_tree_to_string¶
Fortran source: bmad/modules/expression_mod.f90
expression_tree_to_string(tree: pybmad._pybmad.ExpressionTreeStruct, include_root: bool | None = None, n_node: typing.SupportsInt | typing.SupportsIndex | None = None, parent: pybmad._pybmad.ExpressionTreeStruct | None = None) -> str
Function expression_tree_to_string (tree, include_root, n_node, parent) result(str_out)
Routine to convert an expression tree to a expression string.
| Parameters: |
|
|---|
| Returns: |
|
|---|
expression_value¶
Fortran source: bmad/modules/expression_mod.f90
expression_value(expression: str, var: pybmad._pybmad.ControlVar1StructArray1D | None = None, use_old: bool | None = None) -> pybmad._pybmad.ExpressionValue
Function expression_value (expression, err_flag, err_str, var, use_old) result (value)
Routine to evaluate a mathematical expression encoded in a string.
Also see: expression_string_to_stack expression_stack_value
| Parameters: |
|
|---|
| Returns: |
|
|---|
fft1¶
Fortran source: bmad/space_charge/fast_fourier_am.f90
fft1(a: pybmad._pybmad.RealArray1D, b: pybmad._pybmad.RealArray1D, n: typing.SupportsInt | typing.SupportsIndex, isn: typing.SupportsInt | typing.SupportsIndex) -> int
Wrapper for Fortran routine fft1
| Parameters: |
|
|---|
| Returns: |
|
|---|
fibre_to_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
fibre_to_ele(ptc_fibre: pybmad._pybmad.Fibre, branch: pybmad._pybmad.BranchStruct, ix_ele: typing.SupportsInt | typing.SupportsIndex, from_mad: bool | None = None) -> pybmad._pybmad.FibreToEle
Wrapper for Fortran routine fibre_to_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
field_attribute_free¶
Fortran source: bmad/modules/attribute_mod.f90
field_attribute_free(ele: pybmad._pybmad.EleStruct, attrib_name: str) -> bool
Function field_attribute_free (ele, attrib_name) result (free)
Routine to check if a field attribute is free to vary.
Field attributes are either normalized (EG K2 of a sextupole) or unnormalized (EG B2_GRADIENT of a sextupole). Whether normalized or unnormalized attributes are free to vary will depend on the setting of ele%field_master.
Generally, this routine should not be called directly. Use the routine attribute_free instead.
| Parameters: |
|
|---|
| Returns: |
|
|---|
finalize_reflectivity_table¶
Fortran source: bmad/photon/photon_reflection_mod.f90
finalize_reflectivity_table(table: pybmad._pybmad.PhotonReflectTableStruct, in_degrees: bool) -> None
Subroutine finalize_reflectivity_table (table, in_degrees)
Routine to finalize the construction of the reflectivity tables for a surface.
| Parameters: |
|
|---|
find_element_ends¶
Fortran source: bmad/modules/bmad_routine_interface.f90
find_element_ends(ele: pybmad._pybmad.EleStruct, ix_multipass: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.FindElementEnds
Wrapper for Fortran routine find_element_ends
| Parameters: |
|
|---|
| Returns: |
|
|---|
find_fwhm¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
find_fwhm(bound: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine find_fwhm(bound,args,fwhm)
Finds the full width at half max of psi(t). fwhm * c_light / TwoRtTwoLnTwo is taken as the bunch length.
Steps followed: Find value for p(0) that normalizes the solution to dpsi/dt. Find max value of p(t) for the value of p(0) found in the previous step. Find find tlower, tlower < 0, such that p(tlower) = pmax/2. Find find tupper, tupper > 0, such that p(tupper) = pmax/2. fwhm is tupper-tlower
| Parameters: |
|
|---|
| Returns: |
|
|---|
find_matching_fieldmap¶
Fortran source: bmad/modules/bmad_routine_interface.f90
find_matching_fieldmap(file_name: str, ele: pybmad._pybmad.EleStruct, fm_type: typing.SupportsInt | typing.SupportsIndex, ignore_slaves: bool | None = None) -> pybmad._pybmad.FindMatchingFieldmap
Wrapper for Fortran routine find_matching_fieldmap
| Parameters: |
|
|---|
| Returns: |
|
|---|
find_normalization¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
find_normalization(bound: typing.SupportsFloat | typing.SupportsIndex, p0: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine find_normalization(bound,p0,args,pnrml)
Finds value for boundary condition psi(0) that results in integral of psi(t) from -bound to +bound to be 1.0. This is done with the secant method. Repeadedly calls integrate_psi with different values for psi(0).
| Parameters: |
|
|---|
| Returns: |
|
|---|
floor_angles_to_w_mat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
floor_angles_to_w_mat(theta: typing.SupportsFloat | typing.SupportsIndex, phi: typing.SupportsFloat | typing.SupportsIndex, psi: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.FloorAnglesToWMat
Wrapper for Fortran routine floor_angles_to_w_mat
| Parameters: |
|
|---|
| Returns: |
|
|---|
floor_w_mat_to_angles¶
Fortran source: bmad/modules/bmad_routine_interface.f90
floor_w_mat_to_angles(w_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"], floor0: pybmad._pybmad.FloorPositionStruct | None = None) -> pybmad._pybmad.FloorWMatToAngles
Wrapper for Fortran routine floor_w_mat_to_angles
| Parameters: |
|
|---|
| Returns: |
|
|---|
form_complex_taylor¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
form_complex_taylor(re_taylor: pybmad._pybmad.TaylorStruct, im_taylor: pybmad._pybmad.TaylorStruct) -> pybmad._pybmad.ComplexTaylorStruct
Subroutine form_complex_taylor (re_taylor, im_taylor, complex_taylor)
Subroutine to form a complex taylor from two taylor series representing the real and imaginary parts
| Parameters: |
|
|---|
| Returns: |
|
|---|
form_digested_bmad_file_name¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
form_digested_bmad_file_name(lat_file: str, use_line: str | None = None) -> pybmad._pybmad.FormDigestedBmadFileName
Subroutine form_digested_bmad_file_name (lat_file, digested_file, full_lat_file, use_line)
Subroutine to form the standard name of the Bmad digested file. The standard digested file name has the suffix added to the file name: suffix = '.digested' + bmad_inc_version$ Exception: If the use_line argument is present and not blank, the suffix will be: suffix = '.' + use_line + '.digested' + bmad_inc_version$
| Parameters: |
|
|---|
| Returns: |
|
|---|
fringe_here¶
Fortran source: bmad/modules/bmad_routine_interface.f90
fringe_here(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, particle_at: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine fringe_here
| Parameters: |
|
|---|
| Returns: |
|
|---|
g_bend_from_em_field¶
Fortran source: bmad/modules/em_field_mod.f90
g_bend_from_em_field(b: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], e: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], orbit: pybmad._pybmad.CoordStruct) -> typing.Annotated[list[float], "FixedSize(3)"]
Function g_bend_from_em_field (B, E, orbit) result (g_bend)
Routine to calculate the bending strength (1/bending_radius) for a given particle for a given field. This will include the dipole bending field of an sbend.
| Parameters: |
|
|---|
| Returns: |
|
|---|
g_bending_strength_from_em_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
g_bending_strength_from_em_field(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, s_rel: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, local_ref_frame: bool) -> pybmad._pybmad.GBendingStrengthFromEmField
Wrapper for Fortran routine g_bending_strength_from_em_field
| Parameters: |
|
|---|
| Returns: |
|
|---|
g_integrals_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
g_integrals_calc(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine g_integrals_calc
| Parameters: |
|
|---|
gamma_ref¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gamma_ref(ele: pybmad._pybmad.EleStruct) -> float
Wrapper for Fortran routine gamma_ref
| Parameters: |
|
|---|
| Returns: |
|
|---|
gen_grad1_to_gg_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gen_grad1_to_gg_taylor(ele: pybmad._pybmad.EleStruct, gen_grad: pybmad._pybmad.GenGradMapStruct, iz: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.GgTaylorStructArray1D
Wrapper for Fortran routine gen_grad1_to_gg_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
gen_grad_at_s_to_gg_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gen_grad_at_s_to_gg_taylor(ele: pybmad._pybmad.EleStruct, gen_grad: pybmad._pybmad.GenGradMapStruct, s_pos: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.GgTaylorStructArray1D
Wrapper for Fortran routine gen_grad_at_s_to_gg_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
gen_grad_field¶
Fortran source: bmad/modules/em_field_mod.f90
gen_grad_field(deriv: pybmad._pybmad.RealArray1D, gg: pybmad._pybmad.GenGrad1Struct, rho: typing.SupportsFloat | typing.SupportsIndex, theta: typing.SupportsFloat | typing.SupportsIndex, field: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine gen_grad_field
| Parameters: |
|
|---|
get_bl_from_fwhm¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
get_bl_from_fwhm(bound: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine get_bl_from_fwhm(bound,args,sigma)
Calculate bunch length as fwhm * c_light / TwoRtTwoLnTwo. Where fwhm is full width at half max of solution to dpsi/dt.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_called_file¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
get_called_file(delim: str, call_file: str, err: bool) -> None
Wrapper for Fortran routine get_called_file
| Parameters: |
|
|---|
get_emit_from_sigma_mat¶
Fortran source: bmad/modules/mode3_mod.f90
get_emit_from_sigma_mat(sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Nmat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None) -> pybmad._pybmad.GetEmitFromSigmaMat
Subroutine get_emit_from_sigma_mat(sigma_mat, normal, Nmat, err_flag)
Given a beam envelop sigma matrix sigma_mat, this returns the 3 normal mode emittances.
The normal mode emittance of the sigma matrix are the eigenvalues of sigma_mat . S
If Nmat is present, then the modes are ordered such that the eigensystem most closely resembles Nmat. If Nmat is not present, then the modes are ordered according to which plane they dominate.
/ 0 1 0 0 0 0 \
|-1 0 0 0 0 0 |
S = | 0 0 0 1 0 0 | | 0 0 -1 0 0 0 | | 0 0 0 0 0 1 | \ 0 0 0 0 -1 0 /
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_list_of_names¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
get_list_of_names(ele: pybmad._pybmad.EleStruct, err_str: str, name_list: pybmad._pybmad.CharacterAlloc1D, delim: str, delim_found: bool, err_flag: bool) -> None
Subroutine get_list_of_names (ele, err_str, delim, delim_found)
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
get_next_word¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
get_next_word(word: str, delim_list: str, upper_case_word: bool | None = None, call_check: bool | None = None) -> pybmad._pybmad.GetNextWord
Subroutine get_next_word (word, ix_word, delim_list, delim, delim_found, upper_case_word, call_check, err_flag)
Subroutine to get the next word from the input stream. This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_sequence_args¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
get_sequence_args(seq_name: str, arg_list: pybmad._pybmad.CharacterAlloc1D, delim: str, err_flag: bool) -> None
Subroutine get_sequence_args (seq_name, arg_list, delim, err_flag)
Subroutine to get the argument list for a replacement_line or a list. This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
get_slave_list¶
Fortran source: bmad/modules/bmad_routine_interface.f90
get_slave_list(lord: pybmad._pybmad.EleStruct) -> pybmad._pybmad.GetSlaveList
Wrapper for Fortran routine get_slave_list
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_switch¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
get_switch(name: str, name_list: pybmad.pybmad.CharacterAlloc1D, switch: typing.SupportsInt | typing.SupportsIndex, err: bool, ele: pybmad._pybmad.EleStruct, delim: str, delim_found: bool) -> None
Wrapper for Fortran routine get_switch
| Parameters: |
|
|---|
gg_taylor_equal_gg_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gg_taylor_equal_gg_taylor(gg_taylor1: pybmad._pybmad.GgTaylorStruct, gg_taylor2: pybmad._pybmad.GgTaylorStruct) -> None
Wrapper for Fortran routine gg_taylor_equal_gg_taylor
| Parameters: |
|
|---|
gg_taylors_equal_gg_taylors¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gg_taylors_equal_gg_taylors(gg_taylor1: pybmad._pybmad.GgTaylorStructArray1D, gg_taylor2: pybmad._pybmad.GgTaylorStructArray1D) -> None
Wrapper for Fortran routine gg_taylors_equal_gg_taylors
| Parameters: |
|
|---|
gpt_field_grid_scaling¶
Fortran source: bmad/interface/gpt_interface_mod.f90
gpt_field_grid_scaling(ele: pybmad._pybmad.EleStruct, dimensions: typing.SupportsInt | typing.SupportsIndex, field_scale: typing.SupportsFloat | typing.SupportsIndex, ref_time: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine gpt_field_grid_scaling
| Parameters: |
|
|---|
gpt_max_field_reference¶
Fortran source: bmad/interface/gpt_interface_mod.f90
gpt_max_field_reference(pt0: pybmad._pybmad.GridFieldPt1Struct, ele: pybmad._pybmad.EleStruct, field_value: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine gpt_max_field_reference
| Parameters: |
|
|---|
gpt_to_particle_bunch¶
Fortran source: bmad/interface/gpt_interface_mod.f90
gpt_to_particle_bunch(gpt_file: str, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.GptToParticleBunch
Subroutine gpt_to_particle_bunch (gpt_file, ele, bunch, err_flag)
Routine to initialize a bunch of particles from a GPT screen file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
gradient_shift_sr_wake¶
Fortran source: bmad/modules/bmad_routine_interface.f90
gradient_shift_sr_wake(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> float
Wrapper for Fortran routine gradient_shift_sr_wake
| Parameters: |
|
|---|
| Returns: |
|
|---|
grid_field_interpolate¶
Fortran source: bmad/modules/em_field_mod.f90
grid_field_interpolate(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, grid: pybmad._pybmad.GridFieldStruct, err_flag: bool, x1: typing.SupportsFloat | typing.SupportsIndex, x2: typing.SupportsFloat | typing.SupportsIndex | None = None, x3: typing.SupportsFloat | typing.SupportsIndex | None = None, allow_s_out_of_bounds: bool | None = None, print_err: bool | None = None) -> pybmad._pybmad.GridFieldPt1Struct
Subroutine grid_field_interpolate (ele, orbit, grid, field, err_flag, x1, x2, x3, & allow_s_out_of_bounds, print_err)
Subroutine to interpolate the E and B fields on a rectilinear grid.
| Parameters: |
|
|---|
hard_multipole_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
hard_multipole_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine hard_multipole_edge_kick (ele, param, particle_at, orbit, mat6, make_matrix)
Routine to track through the hard edge field of a multipole. The dipole component is ignored and only quadrupole and higher multipoles are included.
This routine handles elements of type: sad_mult, sbend, quadrupole, sextupole
For sad_mult elements, ele%a_pole and ele%b_pole ae used for the multipole values. For the other elements, k1 or k2 is used and it is assumed that we are in the element frame of reference so tilt = 0.
| Parameters: |
|
|---|
has_attribute¶
Fortran source: bmad/modules/attribute_mod.f90
has_attribute(ele: pybmad._pybmad.EleStruct, attrib: str, has_it: bool) -> None
Wrapper for Fortran routine has_attribute
| Parameters: |
|
|---|
has_curvature¶
Fortran source: bmad/photon/photon_utils_mod.f90
has_curvature(phot_ele: pybmad._pybmad.PhotonElementStruct) -> bool
Function has_curvature (phot_ele) result (curved)
Routine to determine if a surface is potentially curved or is flat.
| Parameters: |
|
|---|
| Returns: |
|
|---|
has_orientation_attributes¶
Fortran source: bmad/modules/attribute_mod.f90
has_orientation_attributes(ele: pybmad._pybmad.EleStruct) -> bool
Function has_orientation_attributes (ele) result (has_attribs)
Routine to determine whether an element has orientation attributes like x_offset, etc. Also see: has_attribute function.
| Parameters: |
|
|---|
| Returns: |
|
|---|
hdf5_write_beam¶
Fortran source: bmad/modules/bmad_routine_interface.f90
hdf5_write_beam(file_name: str, bunches: pybmad._pybmad.BunchStructArray1D, append: bool, error: bool, lat: pybmad._pybmad.LatStruct | None = None, alive_only: bool | None = None) -> None
Wrapper for Fortran routine hdf5_write_beam
| Parameters: |
|
|---|
hdf5_write_grid_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
hdf5_write_grid_field(file_name: str, ele: pybmad._pybmad.EleStruct, g_field: pybmad._pybmad.GridFieldStructArray1D, err_flag: bool) -> None
Wrapper for Fortran routine hdf5_write_grid_field
| Parameters: |
|
|---|
hwang_bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
hwang_bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine hwang_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix)
Subroutine to track through the edge field of an sbend using a 2nd order map. Adapted from: Hwang and S. Y. Lee, "Dipole Fringe Field Thin Map for Compact Synchrotrons", Phys. Rev. ST Accel. Beams, 12, 122401, (2015). See the Bmad manual for details.
| Parameters: |
|
|---|
ibs_matrix_c¶
Fortran source: bmad/multiparticle/envelope_mod.f90
ibs_matrix_c(sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], tail_cut: bool, tau: typing.SupportsFloat | typing.SupportsIndex, energy: typing.SupportsFloat | typing.SupportsIndex, n_part: typing.SupportsFloat | typing.SupportsIndex, species: typing.SupportsInt | typing.SupportsIndex, ibs_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> None
Wrapper for Fortran routine ibs_matrix_c
| Parameters: |
|
|---|
igfcoulombfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
igfcoulombfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, dx: typing.SupportsFloat | typing.SupportsIndex, dy: typing.SupportsFloat | typing.SupportsIndex, dz: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine igfcoulombfun
| Parameters: |
|
|---|
igfexfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
igfexfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, dx: typing.SupportsFloat | typing.SupportsIndex, dy: typing.SupportsFloat | typing.SupportsIndex, dz: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine igfexfun
| Parameters: |
|
|---|
igfeyfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
igfeyfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, dx: typing.SupportsFloat | typing.SupportsIndex, dy: typing.SupportsFloat | typing.SupportsIndex, dz: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine igfeyfun
| Parameters: |
|
|---|
igfezfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
igfezfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, dx: typing.SupportsFloat | typing.SupportsIndex, dy: typing.SupportsFloat | typing.SupportsIndex, dz: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine igfezfun
| Parameters: |
|
|---|
init_attribute_name1¶
Fortran source: bmad/modules/attribute_mod.f90
init_attribute_name1(is_ok: bool, ix_key: typing.SupportsInt | typing.SupportsIndex, ix_attrib: typing.SupportsInt | typing.SupportsIndex, name: str, attrib_state: typing.SupportsInt | typing.SupportsIndex | None = None, override: bool | None = None) -> pybmad._pybmad.InitAttributeName1
subroutine init_attribute_name1 (is_ok, ix_key, ix_attrib, name, attrib_state, override)
Routine to initialize a single name in the element attribute name table.
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_attribute_name_array¶
Fortran source: bmad/modules/attribute_mod.f90
init_attribute_name_array() -> None
Subroutine init_attribute_name_array ()
Private routine to initialize the attribute name array used by routines in attribute_mod. Not meant for general use.
init_beam_distribution¶
Fortran source: bmad/multiparticle/beam_utils.f90
init_beam_distribution(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, beam_init: pybmad._pybmad.BeamInitStruct, modes: pybmad._pybmad.NormalModesStruct | None = None, print_p0c_shift_warning: bool | None = None, conserve_momentum: bool | None = None) -> pybmad._pybmad.InitBeamDistribution
Subroutine init_beam_distribution (ele, param, beam_init, beam, err_flag, modes, beam_init_set, print_p0c_shift_warning, conserve_momentum)
Subroutine to initialize a beam of particles. Initialization uses the downstream parameters of ele.
Note: This routine sets the random number generator according to the settings in beam_int and at the end resets things to their initial state.
For more information on individual bunch initialization, see the init_bunch_distribution routine.
Note: The optional "modes" argument generally is used to pass in normal mode parameters as calculated from the lattice. If present, and if a parameter like beam_init%a_emit are set negative, then the corresponding parameter in the modes structure is used. If not present, a warning message is issued and the parameter is set to zero. This is only used for parameters that cannot be negative.
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_bmad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_bmad() -> None
Wrapper for Fortran routine init_bmad
init_bmad_parser_common¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_bmad_parser_common(lat: pybmad._pybmad.LatStruct | None = None) -> None
Wrapper for Fortran routine init_bmad_parser_common
| Parameters: |
|
|---|
init_bunch_distribution¶
Fortran source: bmad/multiparticle/beam_utils.f90
init_bunch_distribution(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, beam_init: pybmad._pybmad.BeamInitStruct, ix_bunch: typing.SupportsInt | typing.SupportsIndex, modes: pybmad._pybmad.NormalModesStruct | None = None, print_p0c_shift_warning: bool | None = None, conserve_momentum: bool | None = None) -> pybmad._pybmad.InitBunchDistribution
Subroutine init_bunch_distribution (ele, param, beam_init, ix_bunch, bunch, err_flag, modes, beam_init_used, print_p0c_shift_warning, conserve_momentum)
Subroutine to initialize a distribution of particles of a bunch. Initialization uses the downstream parameters of ele.
There are four distributions available: '', or 'ran_gauss' -- Random gaussian distribution. 'ellipse' -- concentric ellipses representing a Gaussian distribution 'grid' -- uniform rectangular grid 'KV' -- Kapchinsky-Vladimirsky distribution See the Bmad manual for more information.
The distribution is matched to the Twiss parameters, centroid position, and Energy - z correlation as specified. Coupling in the element ele is incorporated into the distribution.
Note: Except for the random number seed, the random number generator parameters used for this routine are set from the beam_init argument. That is, these parameters are independent of what is used everywhere else.
Note: Make sure: |beam_init%dpz_dz| < mode%sigE_E / mode%sig_z
Note: The optional "modes" argument generally is used to pass in normal mode parameters as calculated from the lattice. If present, and if a parameter like beam_init%a_emit are set negative, then the corresponding parameter in the modes structure is used. If not present, a warning message is issued and the parameter is set to zero. This is only used for parameters that cannot be negative.
Note: To get good results, It is important to make sure that for circular rings that beam_init%center is the correct closed orbit. The closed orbit will shift if, for example, radiation damping is turned on.
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_complex_taylor_series¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_complex_taylor_series(complex_taylor: pybmad._pybmad.ComplexTaylorStruct, n_term: typing.SupportsInt | typing.SupportsIndex, save: bool | None = None) -> None
Subroutine init_complex_taylor_series (complex_taylor, n_term, save)
Subroutine to initialize a Bmad complex_taylor series (6 of these series make a complex_taylor map). Note: This routine does not zero the structure. The calling routine is responsible for setting all values.
| Parameters: |
|
|---|
init_coord¶
Fortran sources (overloaded):
init_coord1:bmad/modules/bmad_routine_interface.f90init_coord2:bmad/modules/bmad_routine_interface.f90init_coord3:bmad/modules/bmad_routine_interface.f90
init_coord(args, *kwargs) Overloaded function.
- init_coord(orb: pybmad._pybmad.CoordStruct, vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], ele: pybmad._pybmad.EleStruct | None = None, element_end: typing.SupportsInt | typing.SupportsIndex | None = None, particle: typing.SupportsInt | typing.SupportsIndex | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None, E_photon: typing.SupportsFloat | typing.SupportsIndex | None = None, t_offset: typing.SupportsFloat | typing.SupportsIndex | None = None, shift_vec6: bool | None = None, spin: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None, s_pos: typing.SupportsFloat | typing.SupportsIndex | None = None, random_on: bool | None = None) -> None
Subroutine init_coord (...)
Routine to initialize a coord_struct.
This routine is an overloaded name for: Subroutine init_coord1 (orb, vec, ele, element_end, particle, direction, E_photon, t_offset, shift_vec6, spin, s_pos, random_on) Subroutine init_coord2 (orb, orb_in, ele, element_end, particle, direction, E_photon, t_offset, shift_vec6, spin, s_pos, random_on) Subroutine init_coord3 (orb, ele, element_end, particle, direction, E_photon, t_offset, shift_vec6, spin, s_pos, random_on)
Note: Unless shift_vec6 is set to False, if ele is a beginning_ele (IE, the element at the beginning of the lattice), or e_gun, orb%vec(6) is shifted so that a particle with orb%vec(6) = 0 will end up with a value of orb%vec(6) corresponding to the beginning_ele's value of ele%value(p0c_start$).
Note: For non-photons, if orb_in%vec(5) is set to real_garbage$, orb_in%t will be used to set orb%vec(5) instead of the standard which is to set orb%t from orb%vec(5).
For photons: orb%vec(5) is set depending upon where the photon is relative to the element. If orb is a photon, and orb_in is not a photon, photon is launched in same direciton as particle except if direction is set.
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
init_custom¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_custom(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine init_custom
| Parameters: |
|
|---|
init_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_ele(key: typing.SupportsInt | typing.SupportsIndex | None = None, sub_key: typing.SupportsInt | typing.SupportsIndex | None = None, ix_ele: typing.SupportsInt | typing.SupportsIndex | None = None, branch: pybmad._pybmad.BranchStruct | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine init_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_gg_taylor_series¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_gg_taylor_series(gg_taylor: pybmad._pybmad.GgTaylorStruct, n_term: typing.SupportsInt | typing.SupportsIndex, save_old: bool | None = None) -> None
Subroutine init_gg_taylor_series (gg_taylor, n_term, save_old)
Subroutine to initialize a Bmad gg_taylor series (6 of these series make a gg_taylor map). Note: This routine does not zero the structure. The calling routine is responsible for setting all values.
| Parameters: |
|
|---|
init_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_lat(n: typing.SupportsInt | typing.SupportsIndex | None = None, init_beginning_ele: bool | None = None) -> pybmad._pybmad.LatStruct
Wrapper for Fortran routine init_lat
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_multipole_cache¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_multipole_cache(ele: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine init_multipole_cache
| Parameters: |
|
|---|
init_photon_from_a_photon_init_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_photon_from_a_photon_init_ele(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, random_on: bool | None = None) -> pybmad._pybmad.CoordStruct
Wrapper for Fortran routine init_photon_from_a_photon_init_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_photon_integ_prob¶
Fortran source: bmad/photon/photon_init_mod.f90
init_photon_integ_prob(gamma: typing.SupportsFloat | typing.SupportsIndex, g: typing.SupportsFloat | typing.SupportsIndex, E_min: typing.SupportsFloat | typing.SupportsIndex, E_max: typing.SupportsFloat | typing.SupportsIndex, vert_angle_min: typing.SupportsFloat | typing.SupportsIndex | None = None, vert_angle_max: typing.SupportsFloat | typing.SupportsIndex | None = None, vert_angle_symmetric: bool | None = None, energy_integ_prob: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.InitPhotonIntegProb
Function init_photon_integ_prob(gamma, g, E_min, E_max, vert_angle_min, vert_angle_max, vert_angle_symmetric, energy_integ_prob, E_photon) result (integ_prob)
Routine to calcuate the integrated probability of emitting a photon in a given vertical angle range and in a given energy range
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_spin_distribution¶
Fortran source: bmad/multiparticle/beam_utils.f90
init_spin_distribution(beam_init: pybmad._pybmad.BeamInitStruct, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.BunchStruct
Subroutine init_spin_distribution (beam_init, bunch, ele)
Initializes a spin distribution according to beam_init%spin.
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_surface_segment¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
init_surface_segment(phot: pybmad._pybmad.PhotonElementStruct, ix_pt: typing.SupportsInt | typing.SupportsIndex, iy_pt: typing.SupportsInt | typing.SupportsIndex) -> None
Subroutine init_surface_segment (phot, ix_pt, iy_pt)
Routine to init the componentes in ele%photon%segmented%pt(ix_pt,iy_pt) for use with segmented surface calculations.
| Parameters: |
|
|---|
init_taylor_series¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_taylor_series(bmad_taylor: pybmad._pybmad.TaylorStruct, n_term: typing.SupportsInt | typing.SupportsIndex, save_old: bool | None = None) -> None
Wrapper for Fortran routine init_taylor_series
| Parameters: |
|
|---|
init_wake¶
Fortran source: bmad/modules/bmad_routine_interface.f90
init_wake(n_sr_long: typing.SupportsInt | typing.SupportsIndex, n_sr_trans: typing.SupportsInt | typing.SupportsIndex, n_sr_z: typing.SupportsInt | typing.SupportsIndex, n_lr_mode: typing.SupportsInt | typing.SupportsIndex, always_allocate: bool | None = None) -> pybmad._pybmad.WakeStruct | None
Wrapper for Fortran routine init_wake
| Parameters: |
|
|---|
| Returns: |
|
|---|
insert_element¶
Fortran source: bmad/modules/bmad_routine_interface.f90
insert_element(lat: pybmad._pybmad.LatStruct, insert_ele: pybmad._pybmad.EleStruct, ix_ele: typing.SupportsInt | typing.SupportsIndex, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, orbit: pybmad._pybmad.CoordStructAlloc1D | None = None) -> None
Wrapper for Fortran routine insert_element
| Parameters: |
|
|---|
integrand_base¶
Fortran source: bmad/multiparticle/touschek_mod.f90
integrand_base(t: typing.SupportsFloat | typing.SupportsIndex, args: pybmad._pybmad.RealArray1D, func_retval__: typing.SupportsFloat | typing.SupportsIndex) -> None
Function integrand_base(t)
This vectorized private function is the integrand in equation 31 of Piwinski's paper.
This intetegrand has a sharp exponential decay, and so a change of variables from t to y where t=exp(y) is applied. This COV makes the integrand more evenly distributed over the domain of integration, which makes it easier for qtrap to integrate.
The change of variables is done using integrand_base_cov, which is then integrated using qtrap.
| Parameters: |
|
|---|
integrate_psi¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
integrate_psi(bound: typing.SupportsFloat | typing.SupportsIndex, p0: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine integrate_psi(bound,p0,args,result)
Integrate psi(t) from -bound to +bound. The integration is done in two parts. First from 0 to -bound, then from 0 to +bound.
| Parameters: |
|
|---|
| Returns: |
|
|---|
integrated_mats¶
Fortran source: bmad/multiparticle/envelope_mod.f90
integrated_mats(eles: pybmad._pybmad.EleStructArray1D, coos: pybmad._pybmad.CoordStructArray1D, Lambda: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Theta: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], Iota: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], mode: pybmad._pybmad.NormalModesStruct) -> None
subroutine integrated_mats(eles,coos,Lambda,Theta,Iota,mode)
integration_timer¶
Fortran sources (overloaded):
integration_timer_ele:bmad/modules/integration_timer_mod.f90integration_timer_fibre:bmad/modules/integration_timer_mod.f90
integration_timer(args, *kwargs) Overloaded function.
- integration_timer(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, start: pybmad._pybmad.CoordStruct, orb_max: pybmad._pybmad.CoordStruct, tol: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine integration_timer_ele
| Parameters: |
|
|---|
| Parameters: |
|
|---|
ion_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ion_kick(orbit: pybmad._pybmad.CoordStruct, r_beam: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], n_beam_part: typing.SupportsFloat | typing.SupportsIndex, a_twiss: pybmad._pybmad.TwissStruct, b_twiss: pybmad._pybmad.TwissStruct, sig_ee: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[float], "FixedSize(3)"]
Wrapper for Fortran routine ion_kick
| Parameters: |
|
|---|
| Returns: |
|
|---|
is_attribute¶
Fortran source: bmad/modules/bmad_struct.f90
is_attribute(ix_attrib: typing.SupportsInt | typing.SupportsIndex, which: typing.SupportsInt | typing.SupportsIndex) -> bool
Function is_attribute (ix_attrib, which) result (is_attrib)
Routine to determine if an attribute index corresponds to a control variable for overlys/groups.
| Parameters: |
|
|---|
| Returns: |
|
|---|
key_name_to_key_index¶
Fortran source: bmad/modules/bmad_routine_interface.f90
key_name_to_key_index(key_str: str, abbrev_allowed: bool | None = None) -> int
Wrapper for Fortran routine key_name_to_key_index
| Parameters: |
|
|---|
| Returns: |
|
|---|
kick_vector_calc¶
Fortran source: bmad/modules/runge_kutta_mod.f90
kick_vector_calc(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, s_body: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, print_err: bool | None = None) -> pybmad._pybmad.KickVectorCalc
Subroutine kick_vector_calc (ele, param, s_rel, orbit, dr_ds, field, err, print_err)
Subroutine to calculate the dr/ds "kick vector" where r = [x, p_x, y, p_y, z, p_z, t, spin_x,y,z]
Remember: In order to simplify the calculation, in the body of any element, P0 is taken to be the P0 at the exit end of the element.
dr(1)/ds = dx/ds = dx/dt * dt/ds where: dx/dt = v_x = p_x / (1 + p_z) dt/ds = (1 + g*x) / v_s g = 1/rho, rho = bending radius (nonzero only in a dipole)
dr(2)/ds = dp_x/ds = dP_x/dt * dt/ds / P0 + g_x * P_z where: dP_x/dt = EM_Force_x g_x = bending in x-plane.
dr(3)/ds = dy/ds = dy/dt * dt/ds where: dy/dt = v_x
dr(4)/ds = dp_y/ds = dP_y/dt * ds/dt / P0 + g_y * P_z where: dP_y/dt = EM_Force_y g_y = bending in y-plane.
NOTE: dr(5)/ds IS IGNORED WHEN CALCULATING Z. SEE TRANSFER_THIS_ORBIT ABOVE. dr(5)/ds = dz/ds = beta * c_light * [dt/ds(ref) - dt/ds] + dbeta/ds * c_light * [t(ref) - t] = beta * c_light * [dt/ds(ref) - dt/ds] + dbeta/ds * vec(5) / beta where: dt/ds(ref) = 1 / beta(ref)
dr(6)/ds = dp_z/ds = d(EM_Force dot v_hat) * dt/ds / P0 where: v_hat = velocity normalized to 1.
dr(7)/ds = dt/ds
dr(8:10)/ds = Spin omega vector
dr(11)/ds = dt_ref/ds
| Parameters: |
|
|---|
| Returns: |
|
|---|
kill_complex_taylor¶
Fortran source: bmad/modules/complex_taylor_mod.f90
kill_complex_taylor(complex_taylor: pybmad._pybmad.ComplexTaylorStructArray1D) -> None
Subroutine kill_complex_taylor (complex_taylor)
Subroutine to deallocate a Bmad complex_taylor map.
| Parameters: |
|
|---|
kill_ptc_layouts¶
Fortran source: bmad/modules/bmad_routine_interface.f90
kill_ptc_layouts(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine kill_ptc_layouts
| Parameters: |
|
|---|
kill_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
kill_taylor(bmad_taylor: pybmad._pybmad.TaylorStructArray1D) -> None
Wrapper for Fortran routine kill_taylor
| Parameters: |
|
|---|
kind_name¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
kind_name(this_kind: typing.SupportsInt | typing.SupportsIndex) -> str
Function kind_name (this_kind) result (kind_str)
function to return the name of a PTC kind.
| Parameters: |
|
|---|
| Returns: |
|
|---|
knot_interpolate¶
Fortran source: bmad/modules/bmad_routine_interface.f90
knot_interpolate(x_knot: pybmad._pybmad.RealArray1D, y_knot: pybmad._pybmad.RealArray1D, x_pt: typing.SupportsFloat | typing.SupportsIndex, interpolation: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.KnotInterpolate
Wrapper for Fortran routine knot_interpolate
| Parameters: |
|
|---|
| Returns: |
|
|---|
knots_to_string¶
Fortran source: bmad/modules/bmad_routine_interface.f90
knots_to_string(x_knot: pybmad._pybmad.RealArray1D, y_knot: pybmad._pybmad.RealArray1D, str: str) -> None
Wrapper for Fortran routine knots_to_string
| Parameters: |
|
|---|
lafun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
lafun(x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine lafun
| Parameters: |
|
|---|
lat_compute_ref_energy_and_time¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_compute_ref_energy_and_time(lat: pybmad._pybmad.LatStruct) -> bool
Wrapper for Fortran routine lat_compute_ref_energy_and_time
| Parameters: |
|
|---|
| Returns: |
|
|---|
lat_ele_locator¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_ele_locator(loc_str: str, lat: pybmad._pybmad.LatStruct, eles: pybmad._pybmad.ElePointerStructAlloc1D, n_loc: typing.SupportsInt | typing.SupportsIndex, above_ubound_is_err: bool | None = None, ix_dflt_branch: typing.SupportsInt | typing.SupportsIndex | None = None, order_by_index: bool | None = None, append_eles: bool | None = None) -> pybmad._pybmad.LatEleLocator
Wrapper for Fortran routine lat_ele_locator
| Parameters: |
|
|---|
| Returns: |
|
|---|
lat_equal_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_geometry¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_geometry(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine lat_geometry
| Parameters: |
|
|---|
lat_make_mat6¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_make_mat6(lat: pybmad._pybmad.LatStruct, ix_ele: typing.SupportsInt | typing.SupportsIndex | None = None, ref_orb: pybmad._pybmad.CoordStructArray1D | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine lat_make_mat6
| Parameters: |
|
|---|
| Returns: |
|
|---|
lat_sanity_check¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_sanity_check(lat: pybmad._pybmad.LatStruct) -> bool
Wrapper for Fortran routine lat_sanity_check
| Parameters: |
|
|---|
| Returns: |
|
|---|
lat_to_ptc_layout¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_to_ptc_layout(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine lat_to_ptc_layout
| Parameters: |
|
|---|
lat_vec_equal_lat_vec¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lat_vec_equal_lat_vec(lat1: pybmad._pybmad.LatStructArray1D, lat2: pybmad._pybmad.LatStructArray1D) -> None
Wrapper for Fortran routine lat_vec_equal_lat_vec
| Parameters: |
|
|---|
lattice_bookkeeper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lattice_bookkeeper(lat: pybmad._pybmad.LatStruct) -> bool
Wrapper for Fortran routine lattice_bookkeeper
| Parameters: |
|
|---|
| Returns: |
|
|---|
lcavity_rf_step_setup¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lcavity_rf_step_setup(ele: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine lcavity_rf_step_setup
| Parameters: |
|
|---|
linear_bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
linear_bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine linear_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix)
Subroutine to track through the edge field of an sbend. Apply only the first order kick, which is edge focusing.
| Parameters: |
|
|---|
linear_coef¶
Fortran source: bmad/modules/expression_mod.f90
linear_coef(stack: pybmad._pybmad.ExpressionAtomStructArray1D) -> pybmad._pybmad.LinearCoef
Function linear_coef (stack, err_flag) result (coef)
Routine to return the linear coefficient of a linear expression.
| Parameters: |
|
|---|
| Returns: |
|
|---|
linear_to_spin_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
linear_to_spin_taylor(q_map: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(7)"]], "FixedSize(4)"]) -> pybmad._pybmad.TaylorStructArray1D
Wrapper for Fortran routine linear_to_spin_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
load_parse_line¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
load_parse_line(action: str, ix_start: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.LoadParseLine
Subroutine load_parse_line (action, ix_start, end_of_file, err_flag)
Subroutine to load characters from the input file. This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
lord_edge_aligned¶
Fortran source: bmad/modules/bmad_routine_interface.f90
lord_edge_aligned(slave: pybmad._pybmad.EleStruct, slave_edge: typing.SupportsInt | typing.SupportsIndex, lord: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine lord_edge_aligned
| Parameters: |
|---|
| Returns: |
|
|---|
low_energy_z_correction¶
Fortran source: bmad/modules/bmad_routine_interface.f90
low_energy_z_correction(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, ds: typing.SupportsFloat | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> float
Wrapper for Fortran routine low_energy_z_correction
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_add_offsets_and_multipoles¶
Fortran source: bmad/modules/mad_mod.f90
mad_add_offsets_and_multipoles(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_add_offsets_and_multipoles (ele, map)
Subroutine to add in the effect of element offsets and/or multipoles on the 2nd order transport map for the element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_concat_map2¶
Fortran source: bmad/modules/mad_mod.f90
mad_concat_map2(map1: pybmad._pybmad.MadMapStruct, map2: pybmad._pybmad.MadMapStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_concat_map2 (map1, map2, map3)
Subroutine to concatinate two 2nd order transport maps. map3 = map2(map1) The equivalent MAD-8 routine is: TMCAT1
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_drift¶
Fortran source: bmad/modules/mad_mod.f90
mad_drift(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_drift (ele, energy, map)
Subroutine to make a transport map for a drift space. The equivalent MAD-8 routine is: TMDRF
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_elsep¶
Fortran source: bmad/modules/mad_mod.f90
mad_elsep(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_elsep (ele, energy, map)
Subroutine to make a transport map for an electric separator. The equivalent MAD-8 routine is: TMSEP
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_map_to_taylor¶
Fortran source: bmad/modules/mad_mod.f90
mad_map_to_taylor(map: pybmad._pybmad.MadMapStruct, energy: pybmad._pybmad.MadEnergyStruct, taylor: pybmad._pybmad.TaylorStructArray1D) -> None
Subroutine mad_map_to_taylor (map, energy, taylor)
Subroutine to convert a MAD order 2 map to a Bmad taylor map. The conversion will also convert between MAD's (t, dE) and Bmad's (beta*t, dP) coords.
| Parameters: |
|
|---|
mad_quadrupole¶
Fortran source: bmad/modules/mad_mod.f90
mad_quadrupole(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_quadrupole (ele, energy, map)
Subroutine to make a transport map for an quadrupole element. The equivalent MAD-8 routine is: TMSEXT
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_rfcavity¶
Fortran source: bmad/modules/mad_mod.f90
mad_rfcavity(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_rfcavity (ele, energy, map)
Subroutine to make a transport map for an rfcavity element. The equivalent MAD-8 routine is: TMRF
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_sbend¶
Fortran source: bmad/modules/mad_mod.f90
mad_sbend(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_sbend (ele, energy, map)
Subroutine to make a transport map for a sector bend element. The equivalent MAD-8 routine is: TMBEND
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_sbend_body¶
Fortran source: bmad/modules/mad_mod.f90
mad_sbend_body(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_sbend_body (ele, energy, map)
Subroutine to make a transport map for the body of a sector dipole. The equivalent MAD-8 routine is: TMSECT
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_sbend_fringe¶
Fortran source: bmad/modules/mad_mod.f90
mad_sbend_fringe(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct, into: bool) -> pybmad._pybmad.MadMapStruct
Subroutine mad_sbend_fringe (ele, energy, into, map)
Subroutine to make a transport map for the fringe field of a dipole. The equivalent MAD-8 routine is: TMFRNG
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_sextupole¶
Fortran source: bmad/modules/mad_mod.f90
mad_sextupole(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_sextupole (ele, energy, map)
Subroutine to make a transport map for an sextupole. The equivalent MAD-8 routine is: TMSEXT
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_solenoid¶
Fortran source: bmad/modules/mad_mod.f90
mad_solenoid(ele: pybmad._pybmad.EleStruct, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine mad_solenoid (ele, energy, map)
Subroutine to make a transport map for an solenoid. The equivalent MAD-8 routine is: TMSEXT
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_tmfoc¶
Fortran source: bmad/modules/mad_mod.f90
mad_tmfoc(el: typing.SupportsFloat | typing.SupportsIndex, sk1: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.MadTmfoc
Subroutine mad_tmfoc (el, sk1, c, s, d, f)
Subroutine to compute the linear focussing functions. The equivalent MAD-8 routine is: TMFOC
| Parameters: |
|
|---|
| Returns: |
|
|---|
mad_tmsymm¶
Fortran source: bmad/modules/mad_mod.f90
mad_tmsymm(te: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]], "FixedSize(6)"]) -> None
subroutine mad_tmsymm (te)
subroutine to symmertrize the 2nd order map t. The equivalent MAD-8 routine is: tmsymm
| Parameters: |
|
|---|
mad_tmtilt¶
Fortran source: bmad/modules/mad_mod.f90
mad_tmtilt(map: pybmad._pybmad.MadMapStruct, tilt: typing.SupportsFloat | typing.SupportsIndex) -> None
Subroutine mad_tmtilt (map, tilt)
Subroutine to apply a tilt to a transport map. The equivalent MAD-8 routine is: TMTILT
| Parameters: |
|
|---|
mad_track1¶
Fortran source: bmad/modules/mad_mod.f90
mad_track1(c0: pybmad._pybmad.CoordStruct, map: pybmad._pybmad.MadMapStruct) -> pybmad._pybmad.CoordStruct
Subroutine mad_track1 (c0, map, c1)
Subroutine to track through a 2nd order transfer map. The equivalent MAD-8 routine is: TMTRAK
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_g2_mats¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_g2_mats(twiss: pybmad._pybmad.TwissStruct, g2_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]], "FixedSize(2)"], g2_inv_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]], "FixedSize(2)"]) -> None
Wrapper for Fortran routine make_g2_mats
| Parameters: |
|
|---|
make_g_mats¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_g_mats(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.MakeGMats
Wrapper for Fortran routine make_g_mats
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_hvbp¶
Fortran source: bmad/modules/mode3_mod.f90
make_hvbp(N: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.MakeHvbp
Subroutine make_HVBP(N, B, V, H, Vbar, Hbar)
Parameterizes the eigen-decomposition of the 6x6 transfer matrix into HVBP as defined in: "From the beam-envelop matrix to synchrotron-radiation integrals" by Ohmi, Hirata, and Oide.
This routine takes N, which is usually made from make_N (also in this module), and decomposes it into H, V, B, and P.
N is defined by: M = N.U.Inverse[N] where U is block diagonal and the blocks are 2x2 rotation matrices. and it is decomposed by this subroutine as, N = H.V.B.P P has the same free parameters as B B "Twiss matrix" has 6 free parameters (Twiss alphas and betas) B blocks have the form / sqrt(beta) 0 \ \ -alpha/sqrt(beta) 1/sqrt(beta) / V "Teng matrix" has 4 free parameters (xy, xpy, ypx, and pxpy coupling) H "Dispersion matrix" has 8 free parameters (xz, xpz, pxz, pxpz, yz, ypz, pyz, pypz coupling)
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_hybrid_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_hybrid_lat(lat_in: pybmad._pybmad.LatStruct, use_taylor: bool | None = None, orb0_arr: pybmad._pybmad.CoordArrayStructArray1D | None = None) -> pybmad._pybmad.LatStruct
Wrapper for Fortran routine make_hybrid_lat
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mad_map¶
Fortran source: bmad/modules/mad_mod.f90
make_mad_map(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> pybmad._pybmad.MakeMadMap
Subroutine make_mad_map (ele, param, energy, map)
Subroutine to make a 2nd order transport map a la MAD.
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, start_orb: pybmad._pybmad.CoordStruct | None = None) -> pybmad._pybmad.MakeMat6
Wrapper for Fortran routine make_mat6
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_bmad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6_bmad(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, start_orb: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.MakeMat6Bmad
Wrapper for Fortran routine make_mat6_bmad
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_bmad_photon¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6_bmad_photon(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, start_orb: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.MakeMat6BmadPhoton
Wrapper for Fortran routine make_mat6_bmad_photon
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_high_energy_space_charge¶
Fortran source: bmad/space_charge/high_energy_space_charge_mod.f90
make_mat6_high_energy_space_charge(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> None
Subroutine make_mat6_high_energy_space_charge (ele, param)
Routine to add the ultra relativistic space charge kick to the element transfer matrix. The routine setup_space_charge_calc must be called initially before any tracking is done. This routine assumes a Gaussian bunch and is only valid with relativistic particles where the effect of the space charge is small.
| Parameters: |
|
|---|
make_mat6_mad¶
Fortran source: bmad/modules/mad_mod.f90
make_mat6_mad(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, c0: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.CoordStruct
Subroutine make_mat6_mad (ele, param, c0, c1)
Subroutine to make the 6x6 transfer matrix for an element from the 2nd order MAD transport map. The map is stored in ele%taylor. If the map exists then it is simply used to calculate ele%mat6. If ele%taylor doesn't exist then calculate it.
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_symp_lie_ptc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6_symp_lie_ptc(ele: pybmad._pybmad.EleStruct, start_orb: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.CoordStruct
Wrapper for Fortran routine make_mat6_symp_lie_ptc
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6_taylor(ele: pybmad._pybmad.EleStruct, start_orb: pybmad._pybmad.CoordStruct, err_flag: bool | None = None) -> pybmad._pybmad.CoordStruct
Wrapper for Fortran routine make_mat6_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_mat6_tracking¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_mat6_tracking(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, start_orb: pybmad._pybmad.CoordStruct, spin_only: bool | None = None) -> pybmad._pybmad.MakeMat6Tracking
Wrapper for Fortran routine make_mat6_tracking
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_n¶
Fortran source: bmad/modules/mode3_mod.f90
make_n(t6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None) -> pybmad._pybmad.MakeN
Subroutine make_N(t6, N, err_flag, abz_tunes, tunes_out, U)
Given a 1-turn transfer matrix, this returns the matrix N. N converts between normal invarients and phases and canonical coordinates: X = N.J
N is obtained from the Eigen decomposition of the 1-turn transfer matrix. It is obtained by applying certain normalizations to the matrix of Eigen vectors, then making the result real using Q.
If abz_tunes is present, then the eigensystem is ordered by matching the tunes. If abz_tunes is not present, then the eigensystem is ordered by plane dominance.
It is assumed that the synchrotron tune is less than pi.
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_pbrh¶
Fortran source: bmad/multiparticle/envelope_mod.f90
make_pbrh(M: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> pybmad._pybmad.MakePbrh
subroutine make_PBRH(M, P, Bp, R, H, abz_tunes)
Decomposes the 1-turn transfer matrix into normal mode twiss-like parameters, according to Sec. IIIB of Ohmi, Hirata, and Oide paper.
Note: The Twiss parameters generated by this function are identical to those delivered by mode3_mod.
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_smat_from_abc¶
Fortran source: bmad/modules/mode3_mod.f90
make_smat_from_abc(t6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], mode: pybmad._pybmad.NormalModesStruct) -> pybmad._pybmad.MakeSmatFromAbc
Subroutine make_smat_from_abc(t6, mode, sigma_mat, err_flag, Nout)
Given the 1-turn transfer matrix and a normal_modes_struct containing the normal mode emittances, this routine returns the beam envelop sigma matrix.
sigma_mat = N.D.transpose(N) equivalent to: sigma_mat.S = N.D.mat_symp_conj(N)
One way to populate mode%a%tune and mode%b%tune: mode%a%tune = mod(lat%ele(lat%n_ele_track)%a%phi, twopi) mode%b%tune = mod(lat%ele(lat%n_ele_track)%b%phi, twopi)
| Parameters: |
|
|---|
| Returns: |
|
|---|
make_unit_mad_map¶
Fortran source: bmad/modules/mad_mod.f90
make_unit_mad_map(map: pybmad._pybmad.MadMapStruct) -> None
Subroutine make_unit_mad_map (map)
Subroutine to initialize a 2nd order transport map to unity.
| Parameters: |
|
|---|
make_v¶
Fortran source: bmad/multiparticle/envelope_mod.f90
make_v(M: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], V: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> None
subroutine make_V(M,V,abz_tunes)
For a one-turn transfer matrix M, this routine find the eigen matrix V. V is ordered such that the per turn phase advance of its column pairs agree with abz_tunes. It is normalized to be symplectic.
make_v_mats¶
Fortran source: bmad/modules/bmad_routine_interface.f90
make_v_mats(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.MakeVMats
Wrapper for Fortran routine make_v_mats
| Parameters: |
|
|---|
| Returns: |
|
|---|
makeup_control_slave¶
Fortran source: bmad/modules/bookkeeper_mod.f90
makeup_control_slave(lat: pybmad._pybmad.LatStruct, slave: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Subroutine makeup_control_slave (lat, slave, err_flag)
This routine is not meant for general use.
makeup_group_lord¶
Fortran source: bmad/modules/bookkeeper_mod.f90
makeup_group_lord(lat: pybmad._pybmad.LatStruct, lord: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Subroutine makeup_group_lord (lat, lord, err_flag)
Subroutine to calculate the attributes of group slave elements. This routine is private to bookkeeper_mod.
makeup_multipass_slave¶
Fortran source: bmad/modules/bookkeeper_mod.f90
makeup_multipass_slave(lat: pybmad._pybmad.LatStruct, slave: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Subroutine makeup_multipass_slave (lat, slave, err_flag)
Subroutine to calcualte the attributes of multipass slave elements. This routine is not meant for guse.
makeup_super_slave¶
Fortran source: bmad/modules/bookkeeper_mod.f90
makeup_super_slave(lat: pybmad._pybmad.LatStruct, slave: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Subroutine makeup_super_slave (lat, slave, err_flag)
Subroutine to calcualte the attributes of superposition slave elements. This routine is not meant for general use.
makeup_super_slave1¶
Fortran source: bmad/modules/bookkeeper_mod.f90
makeup_super_slave1(slave: pybmad._pybmad.EleStruct, lord: pybmad._pybmad.EleStruct, offset: typing.SupportsFloat | typing.SupportsIndex, param: pybmad._pybmad.LatParamStruct, include_upstream_end: bool, include_downstream_end: bool) -> bool
Subroutine makeup_super_slave1 (slave, lord, offset, param, include_upstream_end, include_downstream_end)
Routine to construct a super_slave from a super_lord when the slave has only one lord. Note: Reference energy and times are not computed in this routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
map1_inverse¶
Fortran source: bmad/modules/bmad_routine_interface.f90
map1_inverse(map1: pybmad._pybmad.SpinOrbitMap1Struct) -> pybmad._pybmad.SpinOrbitMap1Struct
Wrapper for Fortran routine map1_inverse
| Parameters: |
|
|---|
| Returns: |
|
|---|
map1_make_unit¶
Fortran source: bmad/modules/bmad_routine_interface.f90
map1_make_unit() -> pybmad._pybmad.SpinOrbitMap1Struct
Wrapper for Fortran routine map1_make_unit
| Returns: |
|
|---|
map1_times_map1¶
Fortran source: bmad/modules/bmad_routine_interface.f90
map1_times_map1(map2: pybmad._pybmad.SpinOrbitMap1Struct, map1: pybmad._pybmad.SpinOrbitMap1Struct, map_out: pybmad._pybmad.SpinOrbitMap1Struct) -> None
Wrapper for Fortran routine map1_times_map1
| Parameters: |
|
|---|
map_to_angle_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
map_to_angle_coords(t_canon: pybmad._pybmad.TaylorStructArray1D) -> pybmad._pybmad.TaylorStructArray1D
Wrapper for Fortran routine map_to_angle_coords
| Parameters: |
|
|---|
| Returns: |
|
|---|
mark_patch_regions¶
Fortran source: bmad/modules/wall3d_mod.f90
mark_patch_regions(branch: pybmad._pybmad.BranchStruct) -> None
Subroutine mark_patch_regions (branch)
Routine to mark which regions in a wall3d structure contain patch elements. This routine should be called by any routine that creates a beam chamber wall.
| Parameters: |
|
|---|
master_parameter_value¶
Fortran source: bmad/modules/bmad_routine_interface.f90
master_parameter_value(master_parameter: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct) -> float
Wrapper for Fortran routine master_parameter_value
| Parameters: |
|
|---|
| Returns: |
|
|---|
mat4_multipole¶
Fortran source: bmad/modules/bmad_routine_interface.f90
mat4_multipole(knl: typing.SupportsFloat | typing.SupportsIndex, tilt: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(4)"]], "FixedSize(4)"]
Wrapper for Fortran routine mat4_multipole
| Parameters: |
|
|---|
| Returns: |
|
|---|
mat6_add_offsets¶
Fortran source: bmad/modules/bmad_routine_interface.f90
mat6_add_offsets(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> None
Wrapper for Fortran routine mat6_add_offsets
| Parameters: |
|
|---|
mat6_add_pitch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
mat6_add_pitch(x_pitch_tot: typing.SupportsFloat | typing.SupportsIndex, y_pitch_tot: typing.SupportsFloat | typing.SupportsIndex, orientation: typing.SupportsInt | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> None
Wrapper for Fortran routine mat6_add_pitch
| Parameters: |
|
|---|
mat6_to_complex_taylor¶
Fortran source: bmad/modules/complex_taylor_mod.f90
mat6_to_complex_taylor(vec0: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.ComplexTaylorStructArray1D
Subroutine mat6_to_complex_taylor (vec0, mat6, complex_taylor)
Subroutine to form a first order complex_taylor map from the 6x6 transfer matrix and the 0th order transfer vector.
| Parameters: |
|
|---|
| Returns: |
|
|---|
mat_symp_decouple¶
Fortran source: bmad/modules/bmad_routine_interface.f90
mat_symp_decouple(t0: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]], "FixedSize(4)"], type_out: bool) -> pybmad._pybmad.MatSympDecouple
Wrapper for Fortran routine mat_symp_decouple
| Parameters: |
|
|---|
| Returns: |
|
|---|
match_ele_to_mat6¶
Fortran source: bmad/modules/bmad_routine_interface.f90
match_ele_to_mat6(ele: pybmad._pybmad.EleStruct, start_orb: pybmad._pybmad.CoordStruct, include_delta_time: bool | None = None, set_trombone: bool | None = None) -> pybmad._pybmad.MatchEleToMat6
Wrapper for Fortran routine match_ele_to_mat6
| Parameters: |
|
|---|
| Returns: |
|
|---|
mexp¶
Fortran source: bmad/modules/bmad_routine_interface.f90
mexp(x: typing.SupportsFloat | typing.SupportsIndex, m: typing.SupportsInt | typing.SupportsIndex) -> float
Wrapper for Fortran routine mexp
| Parameters: |
|
|---|
| Returns: |
|
|---|
mfft1¶
Fortran source: bmad/space_charge/fast_fourier_am.f90
mfft1(a: pybmad._pybmad.RealArray1D, b: pybmad._pybmad.RealArray1D, n: pybmad._pybmad.IntArray1D, ndim: typing.SupportsInt | typing.SupportsIndex, isn: typing.SupportsInt | typing.SupportsIndex) -> int
Wrapper for Fortran routine mfft1
| Parameters: |
|
|---|
| Returns: |
|
|---|
misalign_ptc_fibre¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
misalign_ptc_fibre(ele: pybmad._pybmad.EleStruct, use_offsets: bool, for_layout: bool) -> pybmad._pybmad.Fibre | None
Subroutine misalign_ptc_fibre (ele, use_offsets, ptc_fibre, for_layout)
Routine to misalign a fibre associated with a Bmad element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
momentum_compaction¶
Fortran source: bmad/modules/bmad_routine_interface.f90
momentum_compaction(branch: pybmad._pybmad.BranchStruct) -> float
Wrapper for Fortran routine momentum_compaction
| Parameters: |
|
|---|
| Returns: |
|
|---|
multi_turn_tracking_analysis¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multi_turn_tracking_analysis(track: pybmad._pybmad.CoordStructArray1D, i_dim: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.MultiTurnTrackingAnalysis
Wrapper for Fortran routine multi_turn_tracking_analysis
| Parameters: |
|
|---|
| Returns: |
|
|---|
multilayer_type_to_multilayer_params¶
Fortran source: bmad/interface/xraylib_interface.f90
multilayer_type_to_multilayer_params(ele: pybmad._pybmad.EleStruct) -> bool
Subroutine multilayer_type_to_multilayer_params (ele, err_flag)
Routine to set the multilayer parameters based upon the multilayer type.
Multilayer types are of the form: "AAA:BBB" Where "AAA" is the atomic formula for the top layer crystal and "BBB" is the second layer atomic formula.
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipass_chain¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipass_chain(ele: pybmad._pybmad.EleStruct, use_super_lord: bool | None = None) -> pybmad._pybmad.MultipassChain
Wrapper for Fortran routine multipass_chain
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole1_ab_to_kt¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole1_ab_to_kt(an: typing.SupportsFloat | typing.SupportsIndex, bn: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.Multipole1AbToKt
Wrapper for Fortran routine multipole1_ab_to_kt
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole1_kt_to_ab¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole1_kt_to_ab(knl: typing.SupportsFloat | typing.SupportsIndex, knsl: typing.SupportsFloat | typing.SupportsIndex, tn: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.Multipole1KtToAb
Wrapper for Fortran routine multipole1_kt_to_ab
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole_ab_to_kt¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_ab_to_kt(an: pybmad._pybmad.RealArray1D, bn: pybmad._pybmad.RealArray1D, knl: pybmad._pybmad.RealArray1D, tn: pybmad._pybmad.RealArray1D) -> None
Wrapper for Fortran routine multipole_ab_to_kt
| Parameters: |
|
|---|
multipole_ele_to_ab¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_ele_to_ab(ele: pybmad._pybmad.EleStruct, use_ele_tilt: bool, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, include_kicks: typing.SupportsInt | typing.SupportsIndex | None = None, original: bool | None = None) -> pybmad._pybmad.MultipoleEleToAb
Wrapper for Fortran routine multipole_ele_to_ab
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole_ele_to_kt¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_ele_to_kt(ele: pybmad._pybmad.EleStruct, use_ele_tilt: bool, knl: pybmad._pybmad.RealArray1D, tilt: pybmad._pybmad.RealArray1D, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, include_kicks: typing.SupportsInt | typing.SupportsIndex | None = None) -> int
Wrapper for Fortran routine multipole_ele_to_kt
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole_init¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_init(who: typing.SupportsInt | typing.SupportsIndex, zero: bool | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine multipole_init
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole_kick¶
Fortran source: bmad/modules/multipole_mod.f90
multipole_kick(knl: typing.SupportsFloat | typing.SupportsIndex, tilt: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex, ref_species: typing.SupportsInt | typing.SupportsIndex, ele_orientation: typing.SupportsInt | typing.SupportsIndex, coord: pybmad._pybmad.CoordStruct, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, ref_orb_offset: bool | None = None) -> None
Subroutine multipole_kick (knl, tilt, n, ref_species, ele_orientation, coord, pole_type, ref_orb_offset)
Subroutine to put in the kick due to a multipole. Note: The kick for an electric multipole does not include any energy change.
| Parameters: |
|
|---|
multipole_kick_mat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_kick_mat(knl: pybmad._pybmad.RealArray1D, tilt: pybmad._pybmad.RealArray1D, ref_species: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, factor: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"]
Wrapper for Fortran routine multipole_kick_mat
| Parameters: |
|
|---|
| Returns: |
|
|---|
multipole_kicks¶
Fortran source: bmad/modules/multipole_mod.f90
multipole_kicks(knl: pybmad._pybmad.RealArray1D, tilt: pybmad._pybmad.RealArray1D, ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, pole_type: typing.SupportsInt | typing.SupportsIndex | None = None, ref_orb_offset: bool | None = None) -> None
Subroutine multipole_kicks (knl, tilt, ele, orbit, pole_type, ref_orb_offset)
Subroutine to put in the kick due to a multipole element. Also see the ab_multipole_kicks routine.
| Parameters: |
|
|---|
multipole_kt_to_ab¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_kt_to_ab(knl: pybmad._pybmad.RealArray1D, knsl: pybmad._pybmad.RealArray1D, tn: pybmad._pybmad.RealArray1D, an: pybmad._pybmad.RealArray1D, bn: pybmad._pybmad.RealArray1D) -> None
Wrapper for Fortran routine multipole_kt_to_ab
| Parameters: |
|
|---|
multipole_spin_tracking¶
Fortran source: bmad/modules/bmad_routine_interface.f90
multipole_spin_tracking(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Wrapper for Fortran routine multipole_spin_tracking
| Parameters: |
|
|---|
mytan¶
Fortran source: bmad/modules/mode3_mod.f90
mytan(y: typing.SupportsFloat | typing.SupportsIndex, x: typing.SupportsFloat | typing.SupportsIndex, arg: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine mytan
| Parameters: |
|
|---|
n_attrib_string_max_len¶
Fortran source: bmad/modules/attribute_mod.f90
n_attrib_string_max_len() -> int
Function n_attrib_string_max_len () result (max_len)
Routine to return the the maximum number of characters in any attribute name known to bmad.
| Returns: |
|
|---|
new_control¶
Fortran source: bmad/modules/bmad_routine_interface.f90
new_control(lat: pybmad._pybmad.LatStruct, ele_name: str | None = None) -> int
Wrapper for Fortran routine new_control
| Parameters: |
|
|---|
| Returns: |
|
|---|
nint_chk¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
nint_chk(re_val: typing.SupportsFloat | typing.SupportsIndex) -> int
Function nint_chk (re_val) result (int_val)
Returns the nearest integer to re_val. Also does out-of-bounds error checking. Used with bmad parsing.
| Parameters: |
|
|---|
| Returns: |
|
|---|
normal_form_complex_taylors¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
normal_form_complex_taylors(one_turn_taylor: pybmad._pybmad.TaylorStructArray1D, rf_on: bool, F: pybmad._pybmad.ComplexTaylorStructArray1D | None = None, L: pybmad._pybmad.ComplexTaylorStructArray1D | None = None, A: pybmad._pybmad.TaylorStructArray1D | None = None, A_inverse: pybmad._pybmad.TaylorStructArray1D | None = None, order: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine normal_form_complex_taylors
| Parameters: |
|
|---|
normal_form_taylors¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
normal_form_taylors(one_turn_taylor: pybmad._pybmad.TaylorStructArray1D, rf_on: bool) -> pybmad._pybmad.NormalFormTaylors
Subroutine normal_form_taylors(one_turn_taylor, rf_on, dhdj, A, A_inverse)
Do a normal form decomposition on a one-turn taylor map M: M = A o R o A_inverse where A maps Floquet (fully normalized) coordinates to lab coordinates. In Floquet coordinates, the amplitudes are defined as J_i = (1/2) (x_i^2 + p_i^2). The map R = exp(:h:) is a pure rotation with h = h(J) is a function of the amplitudes only. The angles (phase advances) are given by phi_i = 2pi*dh/dJ_i. The taylor terms of dhdj are therefore the tunes, chromaticities, amplitude dependent tune shifts, etc.
The mapping procedure for one turn is: z_Floquet_in = A_inverse o z_Lab_in [phi_a, phi_b, phi_c] = 2 pi * dhdj o z_Floquet_in z_Floquet_out = RotationMatrix(phi_a, phi_b, phi_c) . z_Floquet_in z_Lab_out = A o z_Floquet_out
| Parameters: |
|
|---|
| Returns: |
|
|---|
normal_mode3_calc¶
Fortran source: bmad/modules/mode3_mod.f90
normal_mode3_calc(t6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], above_transition: bool | None = None, abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None) -> pybmad._pybmad.NormalMode3Calc
Subroutine normal_mode3_calc (mat, tune, B, HV, above_transition)
Does an Eigen decomposition of the 1-turn transfer matrix (mat) and generates B, V, H.
If the above_transition argument is present and false, then the 3rd (z) mode is assumed to have a positive slip factor (z-mode rotates counter clockwise in phase space). Default is True ==> z-mode has a negative slip factor so the mode rotates clock-wise in phase space.
| Parameters: |
|
|---|
| Returns: |
|
|---|
normal_mode_dispersion¶
Fortran source: bmad/modules/bmad_routine_interface.f90
normal_mode_dispersion(ele: pybmad._pybmad.EleStruct, reverse: bool | None = None) -> None
Wrapper for Fortran routine normal_mode_dispersion
| Parameters: |
|
|---|
normalize_evecs¶
Fortran source: bmad/modules/mode3_mod.f90
normalize_evecs(evec: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> bool
Subroutine normalize_evecs(evec, err_flag)
Normalizes eigenvectors such that transpose(E).S.E = iS, where E = evec_r + i evec_i
| Parameters: |
|
|---|
| Returns: |
|
|---|
num_field_eles¶
Fortran source: bmad/modules/bmad_routine_interface.f90
num_field_eles(ele: pybmad._pybmad.EleStruct) -> int
Wrapper for Fortran routine num_field_eles
| Parameters: |
|
|---|
| Returns: |
|
|---|
num_lords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
num_lords(slave: pybmad._pybmad.EleStruct, lord_type: typing.SupportsInt | typing.SupportsIndex) -> int
Wrapper for Fortran routine num_lords
| Parameters: |
|
|---|
| Returns: |
|
|---|
odeint_bmad¶
Fortran source: bmad/modules/runge_kutta_mod.f90
odeint_bmad(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, s1_body: typing.SupportsFloat | typing.SupportsIndex, s2_body: typing.SupportsFloat | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> pybmad._pybmad.OdeintBmad
Subroutine odeint_bmad (orbit, ele, param, s1_body, s2_body, err_flag, track, mat6, make_matrix)
Subroutine to do Runge Kutta tracking. This routine is adapted from Numerical Recipes. See the NR book for more details.
Notice that this routine has an two tolerances: bmad_com%rel_tol_adaptive_tracking bmad_com%abs_tol_adaptive_tracking
Note: For elements where the reference energy is not constant (lcavity, etc.), and with elements where the reference particle does not follow the reference trajectory (wigglers for example), the calculation of z is "off" while the particle is inside the element. At the ends there is no problem.
| Parameters: |
|
|---|
| Returns: |
|
|---|
odeint_bmad_time¶
Fortran source: bmad/modules/time_tracker_mod.f90
odeint_bmad_time(orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, t_dir: typing.SupportsInt | typing.SupportsIndex, rf_time: typing.SupportsFloat | typing.SupportsIndex, track: pybmad._pybmad.TrackStruct | None = None, t_end: typing.SupportsFloat | typing.SupportsIndex | None = None, extra_field: pybmad._pybmad.EmFieldStruct | None = None) -> pybmad._pybmad.OdeintBmadTime
Subroutine odeint_bmad_time (orb, ele, param, t_dir, rf_time, err_flag, track, t_end, dt_step, extra_field)
Subroutine to do Runge Kutta tracking in time. This routine is adapted from Numerical Recipes. See the NR book for more details.
Tracking is done until the particle is lost or exits the element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
offset_particle¶
Fortran source: bmad/modules/bmad_routine_interface.f90
offset_particle(ele: pybmad._pybmad.EleStruct, set: bool, orbit: pybmad._pybmad.CoordStruct, set_tilt: bool | None = None, set_hvkicks: bool | None = None, drift_to_edge: typing.SupportsInt | typing.SupportsIndex | None = None, s_pos: typing.SupportsFloat | typing.SupportsIndex | None = None, set_spin: bool | None = None, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None, time: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.OffsetParticle
Wrapper for Fortran routine offset_particle
| Parameters: |
|
|---|
| Returns: |
|
|---|
offset_photon¶
Fortran source: bmad/modules/bmad_routine_interface.f90
offset_photon(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, set: bool, offset_position_only: bool | None = None, rot_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"] | None = None) -> None
Wrapper for Fortran routine offset_photon
| Parameters: |
|
|---|
one_turn_mat_at_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
one_turn_mat_at_ele(ele: pybmad._pybmad.EleStruct, phi_a: typing.SupportsFloat | typing.SupportsIndex, phi_b: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(4)"]], "FixedSize(4)"]
Wrapper for Fortran routine one_turn_mat_at_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
open_binary_file¶
Fortran source: bmad/parsing/binary_parser_mod.f90
open_binary_file(file_name: str, action: str, r_name: str) -> pybmad._pybmad.OpenBinaryFile
Function open_binary_file (file_name, action, iu, r_name, iver) result (is_ok)
Routine to open a binary file for reading or writing.
| Parameters: |
|
|---|
| Returns: |
|
|---|
orbit_amplitude_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
orbit_amplitude_calc(ele: pybmad._pybmad.EleStruct, orb: pybmad._pybmad.CoordStruct) -> pybmad._pybmad.OrbitAmplitudeCalc
Wrapper for Fortran routine orbit_amplitude_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
orbit_reference_energy_correction¶
Fortran source: bmad/modules/bmad_routine_interface.f90
orbit_reference_energy_correction(orbit: pybmad._pybmad.CoordStruct, p0c_new: typing.SupportsFloat | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine orbit_reference_energy_correction
| Parameters: |
|
|---|
orbit_to_floor_phase_space¶
Fortran source: bmad/modules/bmad_routine_interface.f90
orbit_to_floor_phase_space(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> typing.Annotated[list[float], "FixedSize(6)"]
Wrapper for Fortran routine orbit_to_floor_phase_space
| Parameters: |
|
|---|
| Returns: |
|
|---|
orbit_to_local_curvilinear¶
Fortran source: bmad/modules/bmad_routine_interface.f90
orbit_to_local_curvilinear(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, z_direction: typing.SupportsInt | typing.SupportsIndex | None = None, relative_to: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.FloorPositionStruct
Wrapper for Fortran routine orbit_to_local_curvilinear
| Parameters: |
|
|---|
| Returns: |
|
|---|
orbit_too_large¶
Fortran source: bmad/modules/bmad_routine_interface.f90
orbit_too_large(orbit: pybmad._pybmad.CoordStruct, check_momentum: bool | None = None) -> pybmad._pybmad.OrbitTooLarge
Wrapper for Fortran routine orbit_too_large
| Parameters: |
|
|---|
| Returns: |
|
|---|
order_evecs_by_n_similarity¶
Fortran source: bmad/modules/mode3_mod.f90
order_evecs_by_n_similarity(eval: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], Nmat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.OrderEvecsByNSimilarity
Subroutine order_evecs_by_N_similarity(evec, eval, mat_tunes, Nmat, err_flag)
This subroutine orderes the eigensystem such that Nmat.mat_symp_conj(N) is closest to the identity. Nmat is supplied externally.
| Parameters: |
|
|---|
| Returns: |
|
|---|
order_evecs_by_plane_dominance¶
Fortran source: bmad/modules/mode3_mod.f90
order_evecs_by_plane_dominance(evec: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], eval: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None) -> None
Subroutine order_evecs_by_plane_dominance(evec, eval, mat_tunes)
This subroutine orderes the eigensystem according to which modes dominate the horizontal, vertical, and longitudinal planes. This subroutine works well in machines that are not strongly coupled. In machines with strong coupling, where the relation between the three eigenmodes a, b, c and the three lab coordinates x, y, z can change through the machine, this subroutine will not provide consistent ordering.
| Parameters: |
|
|---|
order_evecs_by_tune¶
Fortran source: bmad/modules/mode3_mod.f90
order_evecs_by_tune(evec: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], eval: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> bool
Subroutine order_evecs_by_tune(evec, eval, mat_tunes, abz_tunes, err_flag)
This subroutine orders the eigensystem by matching the tunes of the eigensystem to externally supplied tunes abz_tunes. abz_tunes is in radians.
| Parameters: |
|
|---|
| Returns: |
|
|---|
order_particles_in_z¶
Fortran source: bmad/multiparticle/wake_mod.f90
order_particles_in_z(bunch: pybmad._pybmad.BunchStruct) -> None
Subroutine order_particles_in_z (bunch)
Routine to order the particles longitudinally in terms of decreasing %vec(5). That is from large z (head of bunch) to small z. Only live particles are ordered.
| Parameters: |
|
|---|
order_super_lord_slaves¶
Fortran source: bmad/modules/bmad_routine_interface.f90
order_super_lord_slaves(lat: pybmad._pybmad.LatStruct, ix_lord: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine order_super_lord_slaves
| Parameters: |
|
|---|
osc_alloc_freespace_array¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_alloc_freespace_array(nlo: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], nhi: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], npad: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine osc_alloc_freespace_array
| Parameters: |
|
|---|
osc_alloc_image_array¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_alloc_image_array(nlo: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], nhi: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], npad: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine osc_alloc_image_array
| Parameters: |
|
|---|
osc_alloc_rectpipe_arrays¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_alloc_rectpipe_arrays(nlo: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], nhi: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], npad: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine osc_alloc_rectpipe_arrays
| Parameters: |
|
|---|
osc_getgrnpipe¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_getgrnpipe(gam: typing.SupportsFloat | typing.SupportsIndex, a: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, delta: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], umin: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], npad: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine osc_getgrnpipe
| Parameters: |
|
|---|
osc_read_rectpipe_grn¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_read_rectpipe_grn() -> None
Wrapper for Fortran routine osc_read_rectpipe_grn
osc_write_rectpipe_grn¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
osc_write_rectpipe_grn(apipe: typing.SupportsFloat | typing.SupportsIndex, bpipe: typing.SupportsFloat | typing.SupportsIndex, delta: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], umin: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], umax: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], nlo: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], nhi: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(3)"], gamma: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine osc_write_rectpipe_grn
| Parameters: |
|
|---|
parse_cartesian_map¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_cartesian_map(ct_map: pybmad._pybmad.CartesianMapStruct, ele: pybmad._pybmad.EleStruct, lat: pybmad._pybmad.LatStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Subroutine parse_cartesian_map (ct_map, ele, lat, delim, delim_found, err_flag)
Subroutine to parse a "cartesian_map = {}" construct
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is private to bmad_parser_mod. This must read in: {type = , dr = , r0 = , pt(i,j,k) = ( (ex_re, ex_im), .... (bz_re, bz_im) ) . . . ) },
parse_cylindrical_map¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_cylindrical_map(cl_map: pybmad._pybmad.CylindricalMapStruct, ele: pybmad._pybmad.EleStruct, lat: pybmad._pybmad.LatStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Wrapper for Fortran routine parse_cylindrical_map
| Parameters: |
|
|---|
parse_gen_grad_map¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_gen_grad_map(gg_map: pybmad._pybmad.GenGradMapStruct, ele: pybmad._pybmad.EleStruct, lat: pybmad._pybmad.LatStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Subroutine parse_gen_grad_map (gg_map, ele, lat, delim, delim_found, err_flag)
Subroutine to parse a "gen_grad_map = {}" construct
parse_grid_field¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_grid_field(g_field: pybmad._pybmad.GridFieldStruct, ele: pybmad._pybmad.EleStruct, lat: pybmad._pybmad.LatStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Wrapper for Fortran routine parse_grid_field
| Parameters: |
|
|---|
parse_integer_list¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_integer_list(err_str: str, lat: pybmad._pybmad.LatStruct, int_array: pybmad._pybmad.IntArray1D, exact_size: bool, delim: str, delim_found: bool, is_ok: bool, open_delim: str | None = None, separator: str | None = None, close_delim: str | None = None, default_value: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Function parse_integer_list (err_str, lat, int_array, exact_size, delim, delim_found, open_delim, separator, close_delim, default_value) result (is_ok)
Routine to parse a list of integers of the form: open_delim integer_1 separator integer_2 . . . close_delim Example: "(1.2, 2.3, 4.4, 8.5)"
Similar to parse_integer_list2 except does not use allocatable array. See parse_integer_list2 for more details
parse_integer_list2¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_integer_list2(err_str: str, lat: pybmad._pybmad.LatStruct, int_array: pybmad._pybmad.IntAlloc1D, num_expected: typing.SupportsInt | typing.SupportsIndex | None = None, open_delim: str | None = None, separator: str | None = None, close_delim: str | None = None, default_value: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.ParseIntegerList2
Function parse_integer_list2 (err_str, lat, int_array, num_found, delim, delim_found, num_expected, open_delim, separator, close_delim, default_value) result (is_ok)
Routine to parse a list of integers of the form open_delim integer_1 separator integer_2 . . . close_delim Example: (1, 2, 4, 8)
| Parameters: |
|
|---|
| Returns: |
|
|---|
parse_real_list¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_real_list(lat: pybmad._pybmad.LatStruct, err_str: str, real_array: pybmad._pybmad.RealArray1D, exact_size: bool, is_ok: bool, open_delim: str | None = None, separator: str | None = None, close_delim: str | None = None, default_value: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.ParseRealList
Function parse_real_list (lat, err_str, real_array, exact_size, delim, delim_found, open_delim, separator, close_delim, default_value, num_found) result (is_ok)
Routine to parse a list of reals of the form: open_delim real_1 separator real_2 . . . close_delim Example: "(1.2, 2.3, 4.4, 8.5)"
Similar to parse_real_list2 except does not use allocatable array. Also see: parse_real_matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
parse_real_list2¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parse_real_list2(lat: pybmad._pybmad.LatStruct, err_str: str, real_array: pybmad._pybmad.RealAlloc1D, num_expected: typing.SupportsInt | typing.SupportsIndex | None = None, open_brace: str | None = None, separator: str | None = None, close_brace: str | None = None, default_value: typing.SupportsFloat | typing.SupportsIndex | None = None, single_value: bool | None = None) -> pybmad._pybmad.ParseRealList2
Function parse_real_list2 (lat, err_str, real_array, num_found, delim, delim_found, num_expected, open_delim, separator, close_delim, default_value, single_value) result (is_ok)
Routine to parse a list of reals of the form: open_brace real_1 separator real_2 . . . close_brace Example: "(1.2, 2.3, 4.4, 8.5)"
Also see: pase_real_list parse_real_matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
parser_add_constant¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_add_constant(word: str, lat: pybmad._pybmad.LatStruct, redef_is_error: bool) -> None
Wrapper for Fortran routine parser_add_constant
| Parameters: |
|
|---|
parser_call_check¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_call_check(word: str, ix_word: typing.SupportsInt | typing.SupportsIndex, delim: str, delim_found: bool, call_found: bool, err_flag: bool | None = None) -> None
Subroutine parser_call_check(word, ix_word, delim, delim_found, call_found, err_flag))
Routine to check if there is a "call::XXX" construct in the input stream.
parser_fast_complex_read¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_fast_complex_read(cmplx_vec: pybmad._pybmad.ComplexArray1D, ele: pybmad._pybmad.EleStruct, err_str: str) -> pybmad._pybmad.ParserFastComplexRead
Function parser_fast_complex_read (cmplx_vec, ele, delim, err_str) result (is_ok)
Routine to read an array of complex numbers.
This routine assumes that the array values are pure numbers in the form "
| Parameters: |
|
|---|
| Returns: |
|
|---|
parser_fast_integer_read¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_fast_integer_read(int_vec: pybmad._pybmad.IntArray1D, ele: pybmad._pybmad.EleStruct, delim_wanted: str, err_str: str, is_ok: bool) -> None
Function parser_fast_integer_read (int_vec, ele, delim_wanted, err_str) result (is_ok)
parser_fast_real_read¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_fast_real_read(real_vec: pybmad._pybmad.RealArray1D, ele: pybmad._pybmad.EleStruct, end_delims: str, err_str: str, exact_size: bool | None = None) -> pybmad._pybmad.ParserFastRealRead
Function parser_fast_real_read (real_vec, ele, end_delims, delim, err_str, exact_size, n_real) result (is_ok)
Routine to read an array of real numbers.
This routine assumes that the array values are pure numbers in the form "
Note: if end_delim is "," and next character is a delim but not ",", the next character is taken as the delim.
| Parameters: |
|
|---|
| Returns: |
|
|---|
parser_file_stack¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_file_stack(how: str, file_name_in: str | None = None, finished: bool | None = None, err: bool | None = None, open_file: bool | None = None, abort_on_open_error: bool | None = None) -> None
Subroutine parser_file_stack (how, file_name_in, finished, err, open_file, abort_on_open_error)
Subroutine to keep track of the files that are opened for reading. This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
parser_get_integer¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_get_integer(int_val: typing.SupportsInt | typing.SupportsIndex, word: str, ix_word: typing.SupportsInt | typing.SupportsIndex, delim: str, delim_found: bool, err: bool, str1: str | None = None, str2: str | None = None) -> None
Wrapper for Fortran routine parser_get_integer
| Parameters: |
|
|---|
parser_get_logical¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_get_logical(attrib_name: str, this_logic: bool, ele_name: str, delim: str, delim_found: bool, err: bool) -> None
Wrapper for Fortran routine parser_get_logical
| Parameters: |
|
|---|
parser_identify_fork_to_element¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_identify_fork_to_element(lat: pybmad._pybmad.LatStruct) -> None
Subroutine parser_identify_fork_to_element (lat)
Routine to identify the elements the forks in a lattice are branching to.
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
parser_init_custom_elements¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_init_custom_elements(lat: pybmad._pybmad.LatStruct) -> None
Subroutine parser_init_custom_elements (lat)
parser_print_line¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_print_line(lat: pybmad._pybmad.LatStruct, end_of_file: bool) -> None
Subroutine parser_print_line(end_of_file)
This routine is called when a print statement is found in the lattice file.
parser_read_lr_wake¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_read_lr_wake(ele: pybmad._pybmad.EleStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Subroutine parser_read_lr_wake (ele, delim, delim_found, err_flag)
Subroutine to read in a long-range wake field from an external file. This subroutine is used by bmad_parser and bmad_parser2.
| Parameters: |
|
|---|
parser_read_old_format_lr_wake¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_read_old_format_lr_wake(ele: pybmad._pybmad.EleStruct, lr_file_name: str) -> None
Subroutine parser_read_old_format_lr_wake (ele, lr_file_name)
Subroutine to read in a long-range wake field from an external file. This subroutine is used by bmad_parser and bmad_parser2.
| Parameters: |
|
|---|
parser_read_old_format_sr_wake¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_read_old_format_sr_wake(ele: pybmad._pybmad.EleStruct, sr_file_name: str) -> None
Subroutine parser_read_old_format_sr_wake (ele, sr_file_name)
Subroutine to read in a short-range wake field from an external file. This subroutine is used by bmad_parser and bmad_parser2.
| Parameters: |
|
|---|
parser_read_sr_wake¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_read_sr_wake(ele: pybmad._pybmad.EleStruct, delim: str, delim_found: bool, err_flag: bool) -> None
Subroutine parser_read_sr_wake (ele, delim, delim_found, err_flag)
Subroutine to read in a short-range wake field. This subroutine is used by bmad_parser and bmad_parser2.
| Parameters: |
|
|---|
parser_transfer_control_struct¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
parser_transfer_control_struct(con_in: pybmad._pybmad.ControlStruct, lord: pybmad._pybmad.EleStruct, ix_var: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.ControlStruct
Subroutine parser_transfer_control_struct (con_in, con_out, lord, ix_var)
Routine to transfer the information from an input control_struct (which stores the user input parameters) to a control_struct that will be stored in the lat%control or lord%control%ramp for a ramper.
| Parameters: |
|
|---|
| Returns: |
|
|---|
particle_in_global_frame¶
Fortran source: bmad/modules/time_tracker_mod.f90
particle_in_global_frame(orb: pybmad._pybmad.CoordStruct, branch: pybmad._pybmad.BranchStruct, in_time_coordinates: bool | None = None, in_body_frame: bool | None = None, w_mat_out: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"] | None = None) -> pybmad._pybmad.CoordStruct
Function particle_in_global_frame (orb, in_time_coordinates, in_body_frame, w_mat_out) result (particle)
Returns the particle in global time coordinates given is coordinates orb in lattice lat.
| Parameters: |
|
|---|
| Returns: |
|
|---|
particle_is_moving_backwards¶
Fortran source: bmad/modules/bmad_routine_interface.f90
particle_is_moving_backwards(orbit: pybmad._pybmad.CoordStruct) -> bool
Wrapper for Fortran routine particle_is_moving_backwards
| Parameters: |
|
|---|
| Returns: |
|
|---|
particle_is_moving_forward¶
Fortran source: bmad/modules/bmad_routine_interface.f90
particle_is_moving_forward(orbit: pybmad._pybmad.CoordStruct, dir: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine particle_is_moving_forward
| Parameters: |
|
|---|
| Returns: |
|
|---|
particle_rf_time¶
Fortran source: bmad/modules/bmad_routine_interface.f90
particle_rf_time(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, reference_active_edge: bool | None = None, s_rel: typing.SupportsFloat | typing.SupportsIndex | None = None, time_coords: bool | None = None, rf_freq: typing.SupportsFloat | typing.SupportsIndex | None = None, abs_time: bool | None = None) -> float
Wrapper for Fortran routine particle_rf_time
| Parameters: |
|
|---|
| Returns: |
|
|---|
patch_flips_propagation_direction¶
Fortran source: bmad/modules/bmad_routine_interface.f90
patch_flips_propagation_direction(x_pitch: typing.SupportsFloat | typing.SupportsIndex, y_pitch: typing.SupportsFloat | typing.SupportsIndex) -> bool
Wrapper for Fortran routine patch_flips_propagation_direction
| Parameters: |
|
|---|
| Returns: |
|
|---|
patch_length¶
Fortran source: bmad/modules/bmad_routine_interface.f90
patch_length(patch: pybmad._pybmad.EleStruct, ref_coords: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine patch_length
| Parameters: |
|
|---|
| Returns: |
|
|---|
photon_absorption_and_phase_shift¶
Fortran source: bmad/interface/xraylib_interface.f90
photon_absorption_and_phase_shift(material: str, Energy: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.PhotonAbsorptionAndPhaseShift
Subroutine photon_absorption_and_phase_shift (material, Energy, absorption, phase_shift, err_flag)
Routine to calcualte the absorption and phase shift values for a photon with a given energy going through a particular material.
| Parameters: |
|
|---|
| Returns: |
|
|---|
photon_add_to_detector_statistics¶
Fortran source: bmad/photon/photon_target_mod.f90
photon_add_to_detector_statistics(orbit0: pybmad._pybmad.CoordStruct, orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, pixel_pt: pybmad._pybmad.PixelPtStruct | None = None) -> pybmad._pybmad.PhotonAddToDetectorStatistics
Subroutine photon_add_to_detector_statistics (orbit0, orbit, ele, ix_pt, iy_pt, pixel_pt)
Routine to add photon statistics to the appropriate pixel of a "detector" grid.
It is assumed that track_to_surface has been called so that the photon is at the detector surface and that orbit%vec(1) and %vec(3) are in surface coords (needed for curved detectors).
| Parameters: |
|
|---|
| Returns: |
|
|---|
photon_reflection¶
Fortran source: bmad/photon/photon_reflection_mod.f90
photon_reflection(graze_angle_in: typing.SupportsFloat | typing.SupportsIndex, energy: typing.SupportsFloat | typing.SupportsIndex, surface: pybmad._pybmad.PhotonReflectSurfaceStruct) -> pybmad._pybmad.PhotonReflection
Subroutine photon_reflection (graze_angle_in, energy, surface, graze_angle_out, phi_out)
Routine to reflect a photon from a surface including both diffuse and specular reflections.
| Parameters: |
|
|---|
| Returns: |
|
|---|
photon_reflection_std_surface_init¶
Fortran source: bmad/photon/photon_reflection_mod.f90
photon_reflection_std_surface_init() -> pybmad._pybmad.PhotonReflectSurfaceStruct
Subroutine photon_reflection_std_surface_init (surface)
Routine to initialize the standard proton reflection probability tables. The standard tables are for 10 nm C film on Al substrate. The surface roughness for diffuse scattering is 200 nm and the the surface roughness correlation length is 5.5 um.
| Returns: |
|
|---|
photon_reflectivity¶
Fortran source: bmad/photon/photon_reflection_mod.f90
photon_reflectivity(angle: typing.SupportsFloat | typing.SupportsIndex, energy: typing.SupportsFloat | typing.SupportsIndex, surface: pybmad._pybmad.PhotonReflectSurfaceStruct) -> pybmad._pybmad.PhotonReflectivity
Subroutine photon_reflectivity (angle, energy, surface, p_reflect, rel_p_specular)
Routine to evaluate the photon reflectivity. probability of absorption = 1 - p_reflect probability of reflection = p_reflect probability of specular reflection = p_reflect * rel_p_specular probability of diffuse reflection = p_reflect * (1 - rel_p_specular)
Use photon_reflection_std_surface_init or read_surface_reflection_file to get surface info.
| Parameters: |
|
|---|
| Returns: |
|
|---|
photon_target_corner_calc¶
Fortran source: bmad/photon/photon_target_mod.f90
photon_target_corner_calc(aperture_ele: pybmad._pybmad.EleStruct, x_lim: typing.SupportsFloat | typing.SupportsIndex, y_lim: typing.SupportsFloat | typing.SupportsIndex, z_lim: typing.SupportsFloat | typing.SupportsIndex, source_ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.TargetPointStruct
Subroutine photon_target_corner_calc (aperture_ele, x_lim, y_lim, z_lim, source_ele, corner)
Routine to calculate the corner coords in the source_ele ref frame.
| Parameters: |
|---|
| Returns: |
|
|---|
photon_target_setup¶
Fortran source: bmad/photon/photon_target_mod.f90
photon_target_setup(ele: pybmad._pybmad.EleStruct) -> None
Subroutine photon_target_setup (ele)
Routine to calculate and store the parmeters needed for photon targeting. This routine is called by Bmad parsing routines and is not meant for general use.
Photon initialization with targeting is done by the routine init_photon_from_a_photon_init_ele Which is called by init_coord.
| Parameters: |
|
|---|
photon_type¶
Fortran source: bmad/photon/photon_utils_mod.f90
photon_type(ele: pybmad._pybmad.EleStruct) -> int
Function photon_type (ele) result (e_type)
Routine to return the type of photon to be tracked: coherent$ or incoherent$.
| Parameters: |
|
|---|
| Returns: |
|
|---|
physical_ele_end¶
Fortran source: bmad/modules/bmad_routine_interface.f90
physical_ele_end(track_end: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, ele_orientation: typing.SupportsInt | typing.SupportsIndex, return_stream_end: bool | None = None) -> int
Wrapper for Fortran routine physical_ele_end
| Parameters: |
|
|---|
| Returns: |
|
|---|
point_photon_emission¶
Fortran source: bmad/photon/track1_photon_mod.f90
point_photon_emission(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct, direction: typing.SupportsInt | typing.SupportsIndex, max_target_area: typing.SupportsFloat | typing.SupportsIndex, w_to_surface: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"] | None = None) -> None
Subroutine point_photon_emission (ele, param, orbit, direction, max_target_area, w_to_surface)
Routine to emit a photon from a point that may be on a surface. If there is a downstream target, the emission calc will take this into account.
| Parameters: |
|
|---|
pointer_to_branch¶
Fortran sources (overloaded):
pointer_to_branch_given_name:bmad/modules/bmad_routine_interface.f90pointer_to_branch_given_ele:bmad/modules/bmad_routine_interface.f90
pointer_to_branch(args, *kwargs) Overloaded function.
- pointer_to_branch(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.BranchStruct | None
Function pointer_to_branch
Routine to return a pointer to the lattice branch associated with a given name or a given element.
This routine is an overloaded name for: pointer_to_branch_given_ele (ele) result (branch_ptr)) pointer_to_branch_given_name (branch_name, lat, parameter_is_branch0, blank_branch) result (branch_ptr)
The lattice branch associated with a given element is not necessarily the branch where the element is located. For example, all lords live in branch #0. But the branch associated with a super_lord element is the branch of its slaves.
To get the branch where the element is located, simply use ele%ix_branch.
Note: Result is ambiguous if ele argument is associated with multiple branches which can happen, for example, with overlay elements.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_ele¶
Fortran sources (overloaded):
pointer_to_ele1:bmad/modules/bmad_routine_interface.f90pointer_to_ele2:bmad/modules/bmad_routine_interface.f90pointer_to_ele3:bmad/modules/bmad_routine_interface.f90pointer_to_ele4:bmad/modules/bmad_routine_interface.f90
pointer_to_ele(args, *kwargs) Overloaded function.
- pointer_to_ele(lat: pybmad._pybmad.LatStruct, ix_ele: typing.SupportsInt | typing.SupportsIndex, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.EleStruct | None
Function pointer_to_ele (...)
Routine to return a pointer to an element. pointer_to_ele is an overloaded name for: Function pointer_to_ele1 (lat, ix_ele, ix_branch) result (ele_ptr) Function pointer_to_ele2 (lat, ele_loc) result (ele_ptr) Function pointer_to_ele3 (lat, ele_name) result (ele_ptr) Function pointer_to_ele4 (lat, foreign_ele) result (ele_ptr)
pointer_to_ele4(lat, foreign_ele) is useful when foreign_ele is associated with a separate lattice that has an identical layout. pointer_to_ele4 will then return the corresponding element in lat.
Note that using ele_name to locate an element is potentially dangerous if there are multiple elements that have the same name. Better in this case is to use: lat_ele_locator
Also see: pointer_to_slave pointer_to_lord
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|---|
| Returns: |
|
|---|
pointer_to_element_at_s¶
Fortran source: bmad/modules/element_at_s_mod.f90
pointer_to_element_at_s(branch: pybmad._pybmad.BranchStruct, s: typing.SupportsFloat | typing.SupportsIndex, choose_max: bool, print_err: bool | None = None) -> pybmad._pybmad.PointerToElementAtS
Function pointer_to_element_at_s (branch, s, choose_max, err_flag, s_eff, position) result (ele)
Function to return a pointer to the element at position s. That is, return ele => branch%ele(ix_ele) such that: If choose_max = True: If s = branch%ele(ix_end_of_branch): ix_ele = ix_end_of_branch Else: branch%ele(ix_ele)%s_strat <= s < branch%ele(ix_ele)%s If choose_max = False: If s = branch%ele(0): ix_ele = 0 Else: branch%ele(ix_ele)%s_start < s <= branch%ele(ix_ele)%s That is, if s corresponds to an element boundary between elements with indexes ix1 and ix2 = ix1 + 1: choose_max = True => ix_ele = ix2 choose_max = False => ix_ele = ix1
Also see: element_at_s
The setting of choose_max only makes a difference when s corresponds to an element boundary.
Note: For a circular lattice, s is evaluated at the effective s which is modulo the branch length: s_eff = s - branch_length * floor(s/branch_length)
Note: If there are multiple elements that are at the given s position due to the presence of an element with a negative length, which of the possible elements is actually chosen is ill-defined.
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_fibre¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_field_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_field_ele(ele: pybmad._pybmad.EleStruct, ix_field_ele: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.PointerToFieldEle
Wrapper for Fortran routine pointer_to_field_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_girder¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_girder(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.PointerToGirder
Wrapper for Fortran routine pointer_to_girder
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_lord¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_lord(slave: pybmad._pybmad.EleStruct, ix_lord: typing.SupportsInt | typing.SupportsIndex, lord_type: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.PointerToLord
Wrapper for Fortran routine pointer_to_lord
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_multipass_lord¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_multipass_lord(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.PointerToMultipassLord
Wrapper for Fortran routine pointer_to_multipass_lord
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_next_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_next_ele(this_ele: pybmad._pybmad.EleStruct, next_ele: pybmad._pybmad.EleStruct, offset: typing.SupportsInt | typing.SupportsIndex | None = None, skip_beginning: bool | None = None, follow_fork: bool | None = None) -> None
Wrapper for Fortran routine pointer_to_next_ele
| Parameters: |
|
|---|
pointer_to_slave¶
Fortran source: bmad/modules/bmad_struct.f90
pointer_to_slave(lord: pybmad._pybmad.EleStruct, ix_slave: typing.SupportsInt | typing.SupportsIndex, slave_type: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.PointerToSlave
Function pointer_to_slave (lord, ix_slave, control, slave_type, ix_lord_back, ix_control, ix_ic) result (slave_ptr)
Function to point to a slave of a lord. Note: Ramper lords do not have any associated slaves (slaves are assigned dynamically at run time).
If slave_type = all$ (the default) the range for ix_slave is: 1 to lord%n_slave for "regular" slaves. lord%n_slave+1 to lord%n_slave+lord%n_slave_field for field overlap slaves.
If slave_type = field_slave$, only the field overlap slaves may be accessed and the range for ix_slave is: 1 to lord%n_slave_field
Also see: pointer_to_lord pointer_to_super_lord pointer_to_ele num_lords
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_super_lord¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_super_lord(slave: pybmad._pybmad.EleStruct, lord_type: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.PointerToSuperLord
Wrapper for Fortran routine pointer_to_super_lord
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_surface_displacement_pt¶
Fortran source: bmad/photon/photon_utils_mod.f90
pointer_to_surface_displacement_pt(ele: pybmad._pybmad.EleStruct, nearest: bool, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, extend_grid: bool | None = None) -> pybmad._pybmad.PointerToSurfaceDisplacementPt
Function pointer_to_surface_displacement_pt (ele, nearest, x, y, ix, iy, extend_grid, xx, yy) result (pt)
Routine to point to the grid point struct associated with point (x,y).
Note: If nearest = True, the grid boundary is a length dr/2 from the boundary grid points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_surface_segmented_pt¶
Fortran source: bmad/photon/photon_utils_mod.f90
pointer_to_surface_segmented_pt(ele: pybmad._pybmad.EleStruct, nearest: bool, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, extend_grid: bool | None = None) -> pybmad._pybmad.PointerToSurfaceSegmentedPt
Function pointer_to_surface_segmented_pt (ele, nearest, x, y, ix, iy, extend_grid, xx, yy) result (pt)
Routine to point to the grid point struct associated with point (x,y).
Note: If nearest = True, the grid boundary is a length dr/2 from the boundary grid points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_wake_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
pointer_to_wake_ele(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.PointerToWakeEle
Wrapper for Fortran routine pointer_to_wake_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
pointer_to_wall3d¶
Fortran source: bmad/modules/wall3d_mod.f90
pointer_to_wall3d(ele: pybmad._pybmad.EleStruct, ix_wall: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.PointerToWall3d
Function pointer_to_wall3d (ele, ix_wall, ds_offset, is_branch_wall) result (wall3d)
Function to return a pointer to a wall3d structure associated with a given lattice element.
Note: The wall associated with a the vacuum chamber is the branch%wall3d.
| Parameters: |
|
|---|
| Returns: |
|
|---|
polar_to_spinor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
polar_to_spinor(polar: pybmad._pybmad.SpinPolarStruct) -> typing.Annotated[list[complex], "FixedSize(2)"]
Wrapper for Fortran routine polar_to_spinor
| Parameters: |
|
|---|
| Returns: |
|
|---|
polar_to_vec¶
Fortran source: bmad/modules/bmad_routine_interface.f90
polar_to_vec(polar: pybmad._pybmad.SpinPolarStruct) -> typing.Annotated[list[float], "FixedSize(3)"]
Wrapper for Fortran routine polar_to_vec
| Parameters: |
|
|---|
| Returns: |
|
|---|
project_emit_to_xyz¶
Fortran source: bmad/modules/mode3_mod.f90
project_emit_to_xyz(ring: pybmad._pybmad.LatStruct, ix: typing.SupportsInt | typing.SupportsIndex, mode: pybmad._pybmad.NormalModesStruct) -> pybmad._pybmad.ProjectEmitToXyz
Subroutine project_emit_to_xyz(ring, ix, mode, sigma_x, sigma_y, sigma_z)
Obtains the projected x, y, and z beamsizes by building the sigma matrix from the normal mode emittances and 1-turn transfer matrix. These projectes beamsize are what would be seen by instrumentation.
This method of projecting takes into account transverse and longitudinal coupling.
This method of obtaining the projected beam sizes is from "Alternitive approach to general coupled linear optics" by Andrzej Wolski.
The normal mode emittances used to generate a beam envelop sigma matrix from the 1-turn transfer matrix. The projected sizes are from the 1, 1 3, 3 and 5, 5 elements of the sigma matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
psi_prime_sca¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
psi_prime_sca(t: typing.SupportsFloat | typing.SupportsIndex, p: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine psi_prime_sca(t, p, dpdt, args)
This wraps the array-valued psi_prime function as a scalar.
See psi_prime comments for details.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_bookkeeper¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ptc_bookkeeper(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine ptc_bookkeeper
| Parameters: |
|
|---|
ptc_calculate_tracking_step_size¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_calculate_tracking_step_size(ptc_layout: pybmad._pybmad.Layout, kl_max: typing.SupportsFloat | typing.SupportsIndex, ds_max: typing.SupportsFloat | typing.SupportsIndex | None = None, even_steps: pybmad._pybmad.BoolAlloc1D | None = None, r_typical: typing.SupportsFloat | typing.SupportsIndex | None = None, dx_tol_bend: typing.SupportsFloat | typing.SupportsIndex | None = None, use_2nd_order: bool | None = None, crossover: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(2)"] | None = None, crossover_wiggler: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(2)"] | None = None) -> None
Subroutine ptc_calculate_tracking_step_size (ptc_layout, kl_max, ds_max, even_steps, r_typical, dx_tol_bend, use_2nd_order)
Routine to calculate the optimum number of tracking steps and order of the integrator (2, 4, or 6) for each fibre in a layout.
See the Bmad manual chapter on PTC for more details.
| Parameters: |
|
|---|
ptc_check_for_lost_particle¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_check_for_lost_particle(do_reset: bool) -> pybmad._pybmad.PtcCheckForLostParticle
Subroutine ptc_check_for_lost_particle (state, ptc_fibre, do_reset)
Routine to check if a particle has been lost when tracking with PTC.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_closed_orbit_calc¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_closed_orbit_calc(branch: pybmad._pybmad.BranchStruct, radiation_damping_on: bool | None = None) -> pybmad._pybmad.CoordStructAlloc1D
Subroutine ptc_closed_orbit_calc (branch, closed_orbit, radiation_damping_on)
Routine to calculate the closed orbit of a lattice branch using PTC. This routine assumes the associated PTC layout has been crated with lat_to_ptc_layout.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_emit_calc¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_emit_calc(ele: pybmad._pybmad.EleStruct, sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.PtcEmitCalc
Subroutine ptc_emit_calc (ele, norm_mode, sigma_mat, closed_orb)
Routine to calculate emittances, etc.
Note: This routine calls the PTC init_all routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_layouts_resplit¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_layouts_resplit(dKL_max: typing.SupportsFloat | typing.SupportsIndex, l_max: typing.SupportsFloat | typing.SupportsIndex, l_max_drift_only: bool, bend_dorb: typing.SupportsFloat | typing.SupportsIndex, sex_dx: typing.SupportsFloat | typing.SupportsIndex, even: bool | None = None, crossover: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(2)"] | None = None, crossover_wiggler: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(2)"] | None = None) -> None
Subroutine ptc_layouts_resplit (dKL_max, l_max, l_max_drift_only, bend_dorb, sex_dx, even, crossover, crossover_wiggler)
Routine to resplit (that is, recalculate the number of integration steps for an element) For the fibres in all layouts. After doing a resplit, the tune (and any other relavent "adjustable" parameters) should be adjusted to the correct values.
| Parameters: |
|
|---|
ptc_one_turn_mat_and_closed_orbit_calc¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_one_turn_mat_and_closed_orbit_calc(branch: pybmad._pybmad.BranchStruct, pz: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Subroutine ptc_one_turn_mat_and_closed_orbit_calc (branch, pz)
Routine to compute the transfer matrices for the individual elements and closed orbit for a lattice branch with closed geometry.
Note: PTC itself does not compute Twiss parameters. Use twiss_from_mat6 to compute this.
| Parameters: |
|
|---|
ptc_ran_seed_put¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ptc_ran_seed_put(iseed: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine ptc_ran_seed_put
| Parameters: |
|
|---|
ptc_read_flat_file¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ptc_read_flat_file(flat_file: pybmad._pybmad.CharacterAlloc1D, create_end_marker: bool | None = None, from_mad: bool | None = None) -> pybmad._pybmad.PtcReadFlatFile
Wrapper for Fortran routine ptc_read_flat_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_set_rf_state_for_c_normal¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ptc_set_rf_state_for_c_normal(nocavity: bool) -> None
Wrapper for Fortran routine ptc_set_rf_state_for_c_normal
| Parameters: |
|
|---|
ptc_set_taylor_order_if_needed¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
ptc_set_taylor_order_if_needed() -> None
Subroutine ptc_set_taylor_order_if_needed()
Routine to see if the taylor_order for PTC needs to be set/changed. For example, for a change in bmad_com%taylor_order.
ptc_spin_calc¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_spin_calc(ele: pybmad._pybmad.EleStruct, sigma_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.PtcSpinCalc
Subroutine ptc_spin_calc (ele, norm_mode, sigma_mat, closed_orb)
Routine to equilibrium polarizations, etc.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_track_all¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
ptc_track_all(branch: pybmad._pybmad.BranchStruct, orbit: pybmad._pybmad.CoordStructAlloc1D) -> pybmad._pybmad.PtcTrackAll
Subroutine ptc_track_all (branch, orbit, track_state, err_flag)
Routine to track from the start to the end of a lattice branch.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ptc_transfer_map_with_spin¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ptc_transfer_map_with_spin(branch: pybmad._pybmad.BranchStruct, t_map: pybmad._pybmad.TaylorStructArray1D, s_map: pybmad._pybmad.TaylorStructArray1D, orb0: pybmad._pybmad.CoordStruct, ix1: typing.SupportsInt | typing.SupportsIndex | None = None, ix2: typing.SupportsInt | typing.SupportsIndex | None = None, one_turn: bool | None = None, unit_start: bool | None = None) -> bool
Wrapper for Fortran routine ptc_transfer_map_with_spin
| Parameters: |
|
|---|
| Returns: |
|
|---|
pwd_mat¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
pwd_mat(lat: pybmad._pybmad.LatStruct, t6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], inductance: typing.SupportsFloat | typing.SupportsIndex, sig_z: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"]
Function pwd_mat(t6, inductance, sig_z) result (t6_pwd)
Calculates potential well distortion as RF defocusing. Calculates t6_pwd=t6.Mpwd, where Mpwd is identity with 65 element proportional to the inductance.
Vpwd = -inductance * lat%param%n_part * e_charge * c_light3 / SQRT(twopi) / sig_z3 / omega_RF !effective RF voltage from PWD Mpwd(6,5) = omega_RF * Vpwd / c_light / lat%ele(0)%value(E_TOT\() * branch%ele(i)%value(l\)) / lat%param%total_length
| Parameters: |
|
|---|
| Returns: |
|
|---|
rad1_damp_and_stoc_mats¶
Fortran source: bmad/modules/rad_6d_mod.f90
rad1_damp_and_stoc_mats(ele: pybmad._pybmad.EleStruct, include_opening_angle: bool, orb_in: pybmad._pybmad.CoordStruct, orb_out: pybmad._pybmad.CoordStruct, g2_tol: typing.SupportsFloat | typing.SupportsIndex, g3_tol: typing.SupportsFloat | typing.SupportsIndex, ele0: pybmad._pybmad.EleStruct | None = None) -> pybmad._pybmad.Rad1DampAndStocMats
Subroutine rad1_damp_and_stoc_mats (ele, include_opening_angle, orb_in, orb_out, rad_map, g2_tol, g3_tol, err_flag, ele0, rad_int1)
Routine to calculate the damping and stochastic matrices for a given lattice element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rad_damp_and_stoc_mats¶
Fortran source: bmad/modules/rad_6d_mod.f90
rad_damp_and_stoc_mats(ele1: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct, include_opening_angle: bool, closed_orbit: pybmad._pybmad.CoordStructArray1D | None = None) -> pybmad._pybmad.RadDampAndStocMats
Subroutine rad_damp_and_stoc_mats (ele1, ele2, include_opening_angle, rmap, mode, xfer_nodamp_mat, err_flag, closed_orbit, rad_int_branch)
Routine to calculate the damping and stochastic variance matrices from exit end of ele1 to the exit end of ele2. Use ele1 = ele2 to get 1-turn matrices.
If ele2 is before ele1 the integration range if from ele1 to the branch end plus from the beginning to ele2.
Note: The ele%mat6 matrices will be remade. By convention, these matrices do not include damping.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rad_g_integrals¶
Fortran source: bmad/modules/rad_6d_mod.f90
rad_g_integrals(ele: pybmad._pybmad.EleStruct, where: typing.SupportsInt | typing.SupportsIndex, orb_in: pybmad._pybmad.CoordStruct, orb_out: pybmad._pybmad.CoordStruct, int_g2: typing.SupportsFloat | typing.SupportsIndex, g_tol: typing.SupportsFloat | typing.SupportsIndex, g2_tol: typing.SupportsFloat | typing.SupportsIndex, g3_tol: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.RadGIntegrals
Subroutine rad_g_integrals (ele, where, orb_in, orb_out, int_g, int_g2, int_g3, g_tol, g2_tol, g3_tol)
Routine to calculate bending strength integrals (g(s) = 1/trajectory_bending_radius(s)) in laboratory coords.
| Parameters: |
|
|---|
| Returns: |
|
|---|
radiation_integrals¶
Fortran source: bmad/modules/bmad_routine_interface.f90
radiation_integrals(lat: pybmad._pybmad.LatStruct, orbit: pybmad._pybmad.CoordStructArray1D, ix_cache: typing.SupportsInt | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.RadiationIntegrals
Wrapper for Fortran routine radiation_integrals
| Parameters: |
|
|---|
| Returns: |
|
|---|
radiation_map_setup¶
Fortran source: bmad/modules/radiation_mod.f90
radiation_map_setup(ele: pybmad._pybmad.EleStruct, ref_orbit_in: pybmad._pybmad.CoordStruct | None = None) -> bool
Subroutine radiation_map_setup (ele, err_flag, ref_orbit_in)
Routine to calculate the radiation kick for a lattice element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ramper_slave_setup¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ramper_slave_setup(lat: pybmad._pybmad.LatStruct, force_setup: bool | None = None) -> None
Wrapper for Fortran routine ramper_slave_setup
| Parameters: |
|
|---|
ramper_value¶
Fortran source: bmad/modules/bmad_routine_interface.f90
ramper_value(ramper: pybmad._pybmad.EleStruct, r1: pybmad._pybmad.ControlRamp1Struct) -> pybmad._pybmad.RamperValue
Wrapper for Fortran routine ramper_value
| Parameters: |
|
|---|
| Returns: |
|
|---|
randomize_lr_wake_frequencies¶
Fortran source: bmad/multiparticle/wake_mod.f90
randomize_lr_wake_frequencies(ele: pybmad._pybmad.EleStruct) -> bool
Subroutine randomize_lr_wake_frequencies (ele, set_done)
Routine to randomize the frequencies of the lr wake HOMs according to: freq = freq_in * (1 + lr_freq_spread) * rr) where rr is a Gaussian distributed random number with unit variance.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rchomp¶
Fortran source: bmad/output/write_lattice_file_mod.f90
rchomp(rel: typing.SupportsFloat | typing.SupportsIndex, plc: typing.SupportsInt | typing.SupportsIndex, out: str) -> None
Wrapper for Fortran routine rchomp
| Parameters: |
|
|---|
re_allocate¶
Fortran sources (overloaded):
re_allocate_wall3d_vertex_array:bmad/modules/wall3d_mod.f90re_allocate_wall3d_section_array:bmad/modules/wall3d_mod.f90
re_allocate(args, *kwargs) Overloaded function.
- re_allocate(section: pybmad._pybmad.Wall3DSectionStructAlloc1D, n: typing.SupportsInt | typing.SupportsIndex, exact: bool | None = None) -> None
Wrapper for Fortran routine re_allocate_wall3d_section_array
| Parameters: |
|
|---|
| Parameters: |
|
|---|
re_allocate_eles¶
Fortran source: bmad/modules/bmad_routine_interface.f90
re_allocate_eles(eles: pybmad._pybmad.ElePointerStructAlloc1D, n: typing.SupportsInt | typing.SupportsIndex, save_old: bool | None = None, exact: bool | None = None) -> None
Wrapper for Fortran routine re_allocate_eles
| Parameters: |
|
|---|
re_associate_node_array¶
Fortran source: bmad/modules/expression_mod.f90
re_associate_node_array(tree: pybmad._pybmad.ExpressionTreeStruct, n: typing.SupportsInt | typing.SupportsIndex, exact: bool | None = None) -> None
Subroutine re_associate_node_array(tree, n, exact)
Routine to resize the tree%node(:) array.
Note: The data of the array is preserved but data at the end of the array will be lost if n is less than the original size of the array
| Parameters: |
|
|---|
re_str¶
Fortran sources (overloaded):
re_str_rp:bmad/output/write_lattice_file_mod.f90re_str_qp:bmad/output/write_lattice_file_mod.f90
re_str(args, *kwargs) Overloaded function.
- re_str(rel: typing.SupportsFloat | typing.SupportsIndex, str_out: str) -> None
Wrapper for Fortran routine re_str_qp
| Parameters: |
|
|---|
| Parameters: |
|
|---|
read_beam_ascii¶
Fortran source: bmad/multiparticle/beam_file_io.f90
read_beam_ascii(file_name: str, beam_init: pybmad._pybmad.BeamInitStruct) -> pybmad._pybmad.ReadBeamAscii
Subroutine read_beam_ascii (file_name, beam, beam_init, err_flag, ele, print_mom_shift_warning, conserve_momentum)
Subroutine to read in a beam definition file. If non_zero, the following components of beam_init are used to rescale the beam: %n_bunch %n_particle %charge_tot
If the beam file has '.h5' or '.hdf5' suffix then the file is taken to be an HDF5 file. Otherwise the file is assumed to be ASCII.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_beam_file¶
Fortran source: bmad/multiparticle/beam_file_io.f90
read_beam_file(file_name: str, beam_init: pybmad._pybmad.BeamInitStruct, ele: pybmad._pybmad.EleStruct | None = None, print_mom_shift_warning: bool | None = None, conserve_momentum: bool | None = None) -> pybmad._pybmad.ReadBeamFile
Subroutine read_beam_file (file_name, beam, beam_init, err_flag, ele, print_mom_shift_warning, conserve_momentum)
Subroutine to read in a beam definition file. If non_zero, the following components of beam_init are used to rescale the beam: %n_bunch %n_particle %bunch_charge -> charge_tot %species
If the beam file has '.h5' or '.hdf5' suffix then the file is taken to be an HDF5 file. Otherwise the file is assumed to be ASCII.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_binary_cartesian_map¶
Fortran source: bmad/parsing/binary_parser_mod.f90
read_binary_cartesian_map(file_name: str, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.ReadBinaryCartesianMap
Subroutine read_binary_cartesian_map (file_name, ele, cart_map, err_flag)
Routine to read a binary cartesian_map structure.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_binary_cylindrical_map¶
Fortran source: bmad/parsing/binary_parser_mod.f90
read_binary_cylindrical_map(file_name: str, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.ReadBinaryCylindricalMap
Subroutine read_binary_cylindrical_map (file_name, ele, cl_map, err_flag)
Routine to read a binary cylindrical_map structure.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_binary_grid_field¶
Fortran source: bmad/parsing/binary_parser_mod.f90
read_binary_grid_field(file_name: str, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.ReadBinaryGridField
Subroutine read_binary_grid_field (file_name, ele, g_field, err_flag)
Routine to read a binary grid_field structure.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_digested_bmad_file¶
Fortran source: bmad/modules/bmad_routine_interface.f90
read_digested_bmad_file(digested_file: str) -> pybmad._pybmad.ReadDigestedBmadFile
Wrapper for Fortran routine read_digested_bmad_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_surface_reflection_file¶
Fortran source: bmad/photon/photon_reflection_mod.f90
read_surface_reflection_file(file_name: str) -> pybmad._pybmad.PhotonReflectSurfaceStruct
Subroutine read_surface_reflection_file (file_name, surface)
Routine to read the reflection probability data for a given type of surface from a file.
| Parameters: |
|
|---|
| Returns: |
|
|---|
reallocate_beam¶
Fortran source: bmad/modules/bmad_routine_interface.f90
reallocate_beam(beam: pybmad._pybmad.BeamStruct, n_bunch: typing.SupportsInt | typing.SupportsIndex, n_particle: typing.SupportsInt | typing.SupportsIndex | None = None, extend: bool | None = None) -> None
Wrapper for Fortran routine reallocate_beam
| Parameters: |
|
|---|
reallocate_bp_com_const¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
reallocate_bp_com_const() -> None
Wrapper for Fortran routine reallocate_bp_com_const
reallocate_bunch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
reallocate_bunch(n_particle: typing.SupportsInt | typing.SupportsIndex, save: bool | None = None) -> pybmad._pybmad.BunchStruct
Wrapper for Fortran routine reallocate_bunch
| Parameters: |
|
|---|
| Returns: |
|
|---|
reallocate_control¶
Fortran source: bmad/modules/bmad_routine_interface.f90
reallocate_control(lat: pybmad._pybmad.LatStruct, n: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine reallocate_control
| Parameters: |
|
|---|
reallocate_coord¶
Fortran sources (overloaded):
reallocate_coord_n:bmad/modules/bmad_routine_interface.f90reallocate_coord_lat:bmad/modules/bmad_routine_interface.f90reallocate_coord_array:bmad/modules/bmad_routine_interface.f90
reallocate_coord(args, *kwargs) Overloaded function.
- reallocate_coord(coord_array: pybmad._pybmad.CoordArrayStructAlloc1D, lat: pybmad._pybmad.LatStruct) -> None
Subroutine reallocate_coord (...)
Routine to allocate or reallocate at allocatable coord_struct array. reallocate_coord is an overloaded name for: reallocate_coord_n (coord, n_coord) reallocate_coord_lat (coord, lat, ix_branch)
Subroutine to allocate an allocatable coord_struct array to at least: coord(0:n_coord) if n_coord arg is used. coord(0:lat%branch(ix_branch)%n_ele_max) if lat arg is used.
The old coordinates are saved If, at input, coord(:) is not allocated, coord(0)%vec is set to zero. In any case, coord(n)%vec for n > 0 is set to zero.
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
reallocate_expression_stack¶
Fortran source: bmad/modules/bmad_routine_interface.f90
reallocate_expression_stack(stack: pybmad._pybmad.ExpressionAtomStructAlloc1D, n: typing.SupportsInt | typing.SupportsIndex, exact: bool | None = None) -> None
Wrapper for Fortran routine reallocate_expression_stack
| Parameters: |
|
|---|
rel_tracking_charge_to_mass¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rel_tracking_charge_to_mass(orbit: pybmad._pybmad.CoordStruct, ref_species: typing.SupportsInt | typing.SupportsIndex) -> float
Wrapper for Fortran routine rel_tracking_charge_to_mass
| Parameters: |
|
|---|
| Returns: |
|
|---|
relative_mode_flip¶
Fortran source: bmad/modules/bmad_routine_interface.f90
release_rad_int_cache¶
Fortran source: bmad/modules/radiation_mod.f90
release_rad_int_cache(ix_cache: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.ReleaseRadIntCache
Subroutine release_rad_int_cache (ix_cache)
Subroutine to release the memory associated with caching wiggler values. See the radiation_integrals routine for further details.
| Parameters: |
|
|---|
| Returns: |
|
|---|
remove_constant_taylor¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
remove_constant_taylor(taylor_in: pybmad._pybmad.TaylorStructArray1D, taylor_out: pybmad._pybmad.TaylorStructArray1D, c0: pybmad._pybmad.RealArray1D, remove_higher_order_terms: bool) -> None
Subroutine remove_constant_taylor (taylor_in, taylor_out, c0, remove_higher_order_terms)
Subroutine to remove the constant part of a taylor map. Optionally terms that are higher order than bmad_com%taylor_order can be removed.
Note: It is assumed that taylor_out has been deallocated before the call to this routine. Calling this routine with the first two actual arguments the same is prohibited.
| Parameters: |
|
|---|
remove_dead_from_bunch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
remove_dead_from_bunch(bunch_in: pybmad._pybmad.BunchStruct) -> pybmad._pybmad.BunchStruct
Wrapper for Fortran routine remove_dead_from_bunch
| Parameters: |
|
|---|
| Returns: |
|
|---|
remove_eles_from_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
remove_eles_from_lat(lat: pybmad._pybmad.LatStruct, check_sanity: bool | None = None) -> None
Wrapper for Fortran routine remove_eles_from_lat
| Parameters: |
|
|---|
remove_lord_slave_link¶
Fortran source: bmad/modules/bmad_routine_interface.f90
remove_lord_slave_link(lord: pybmad._pybmad.EleStruct, slave: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine remove_lord_slave_link
| Parameters: |
|---|
reverse_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
reverse_lat(lat_in: pybmad._pybmad.LatStruct, track_antiparticle: bool | None = None) -> pybmad._pybmad.LatStruct
Wrapper for Fortran routine reverse_lat
| Parameters: |
|
|---|
| Returns: |
|
|---|
rf_coupler_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rf_coupler_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, phase: typing.SupportsFloat | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
No longer in the codebase function rf_clock_setup (branch, n_rf_included, n_rf_excluded) result (ok) import implicit none type (branch_struct), target :: branch integer n_rf_included, n_rf_excluded logical ok end function
| Parameters: |
|
|---|
rf_is_on¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rf_is_on(branch: pybmad._pybmad.BranchStruct, ix_ele1: typing.SupportsInt | typing.SupportsIndex | None = None, ix_ele2: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine rf_is_on
| Parameters: |
|
|---|
| Returns: |
|
|---|
rf_ref_time_offset¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rf_ref_time_offset(ele: pybmad._pybmad.EleStruct, ds: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine rf_ref_time_offset
| Parameters: |
|
|---|
| Returns: |
|
|---|
rfun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
rfun(u: typing.SupportsFloat | typing.SupportsIndex, v: typing.SupportsFloat | typing.SupportsIndex, w: typing.SupportsFloat | typing.SupportsIndex, gam: typing.SupportsFloat | typing.SupportsIndex, a: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, hz: typing.SupportsFloat | typing.SupportsIndex, i: typing.SupportsInt | typing.SupportsIndex, j: typing.SupportsInt | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rfun
| Parameters: |
|
|---|
rk_adaptive_time_step¶
Fortran source: bmad/modules/time_tracker_mod.f90
rk_adaptive_time_step(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orb: pybmad._pybmad.CoordStruct, t_dir: typing.SupportsInt | typing.SupportsIndex, rf_time: typing.SupportsFloat | typing.SupportsIndex, dt_try: typing.SupportsFloat | typing.SupportsIndex, dt_did: typing.SupportsFloat | typing.SupportsIndex, dt_next: typing.SupportsFloat | typing.SupportsIndex, err_flag: bool, extra_field: pybmad._pybmad.EmFieldStruct | None = None) -> None
Wrapper for Fortran routine rk_adaptive_time_step
| Parameters: |
|
|---|
rk_time_step1¶
Fortran source: bmad/modules/time_tracker_mod.f90
rk_time_step1(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, rf_time: typing.SupportsFloat | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, dt: typing.SupportsFloat | typing.SupportsIndex, new_orb: pybmad._pybmad.CoordStruct, err_flag: bool, dr_dt: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(10)"] | None = None, print_err: bool | None = None, extra_field: pybmad._pybmad.EmFieldStruct | None = None) -> typing.Annotated[list[float], "FixedSize(10)"]
Wrapper for Fortran routine rk_time_step1
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotate3¶
Fortran source: bmad/interface/astra_interface_mod.f90
rotate3(vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], angle: typing.SupportsFloat | typing.SupportsIndex, rvec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> None
Wrapper for Fortran routine rotate3
| Parameters: |
|
|---|
rotate_em_field¶
Fortran source: bmad/modules/em_field_mod.f90
rotate_em_field(field: pybmad._pybmad.EmFieldStruct, w_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"], w_inv: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"], calc_dfield: bool | None = None, calc_potential: bool | None = None) -> None
Subroutine rotate_em_field (field, w_mat, w_inv, calc_dfield, calc_potential)
Routine to transform the fields using the given rotation matrices.
| Parameters: |
|
|---|
rotate_field_zx¶
Fortran source: bmad/interface/gpt_interface_mod.f90
rotate_field_zx(field: pybmad._pybmad.EmFieldStruct, theta: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rotate_field_zx
| Parameters: |
|
|---|
rotate_for_curved_surface¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rotate_for_curved_surface(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, set: bool, rot_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"]) -> None
Wrapper for Fortran routine rotate_for_curved_surface
| Parameters: |
|
|---|
rotate_spin¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rotate_spin(rot_vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], spin: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> typing.Annotated[list[float], "FixedSize(4)"]
Wrapper for Fortran routine rotate_spin
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotate_spin_a_step¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rotate_spin_a_step(orbit: pybmad._pybmad.CoordStruct, field: pybmad._pybmad.EmFieldStruct, ele: pybmad._pybmad.EleStruct, ds: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rotate_spin_a_step
| Parameters: |
|
|---|
rotate_spin_given_field¶
Fortran source: bmad/modules/bmad_routine_interface.f90
rotate_spin_given_field(orbit: pybmad._pybmad.CoordStruct, sign_z_vel: typing.SupportsInt | typing.SupportsIndex, BL: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None, EL: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None, qrot: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None) -> None
Wrapper for Fortran routine rotate_spin_given_field
| Parameters: |
|
|---|
s_body_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
s_body_calc(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> float
Wrapper for Fortran routine s_body_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
s_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
s_calc(lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine s_calc
| Parameters: |
|
|---|
sad_mult_hard_bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
sad_mult_hard_bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine sad_mult_hard_bend_edge_kick (ele, param, particle_at, orbit, mat6, make_matrix)
Routine to track through the hard edge bend fringe field for a bend or sad_mult element. Only the bend field is taken into account here. Higher order multipolse must be handled elsewhere.
This routine assumes that the particle coordinates are with respect to the actual magnet face. Thus finite e1/e2 must be taken into account by other routines.
SAD calls this the "linear" fringe even though it is nonlinear.
| Parameters: |
|
|---|
sad_soft_bend_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
sad_soft_bend_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine sad_soft_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix)
Subroutine to track through the ("linear") bend soft edge field of an sbend or sad_mult.
| Parameters: |
|
|---|
save_a_beam_step¶
Fortran source: bmad/modules/bmad_routine_interface.f90
save_a_beam_step(ele: pybmad._pybmad.EleStruct, beam: pybmad._pybmad.BeamStruct, bunch_tracks: pybmad._pybmad.BunchTrackStructArray1D | None = None, s_body: typing.SupportsFloat | typing.SupportsIndex | None = None, is_time_coords: bool | None = None) -> None
Wrapper for Fortran routine save_a_beam_step
| Parameters: |
|
|---|
save_a_bunch_step¶
Fortran source: bmad/modules/bmad_routine_interface.f90
save_a_bunch_step(ele: pybmad._pybmad.EleStruct, bunch: pybmad._pybmad.BunchStruct, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None, s_body: typing.SupportsFloat | typing.SupportsIndex | None = None, is_time_coords: bool | None = None) -> None
Wrapper for Fortran routine save_a_bunch_step
| Parameters: |
|
|---|
save_a_step¶
Fortran source: bmad/modules/bmad_routine_interface.f90
save_a_step(track: pybmad._pybmad.TrackStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, local_ref_frame: bool, orb: pybmad._pybmad.CoordStruct, s_rel: typing.SupportsFloat | typing.SupportsIndex, save_field: bool | None = None, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None, rf_time: typing.SupportsFloat | typing.SupportsIndex | None = None, strong_beam: pybmad._pybmad.StrongBeamStruct | None = None) -> None
Wrapper for Fortran routine save_a_step
| Parameters: |
|
|---|
sbend_body_with_k1_map¶
Fortran source: bmad/modules/bmad_routine_interface.f90
sbend_body_with_k1_map(ele: pybmad._pybmad.EleStruct, dg: typing.SupportsFloat | typing.SupportsIndex, b1: typing.SupportsFloat | typing.SupportsIndex, param: pybmad._pybmad.LatParamStruct, n_step: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine sbend_body_with_k1_map
| Parameters: |
|
|---|
sc_adaptive_step¶
Fortran source: bmad/space_charge/space_charge_mod.f90
sc_adaptive_step(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, include_image: bool, t_now: typing.SupportsFloat | typing.SupportsIndex, dt_step: typing.SupportsFloat | typing.SupportsIndex, sc_field: pybmad._pybmad.EmFieldStructArray1D) -> pybmad._pybmad.ScAdaptiveStep
Subroutine sc_adaptive_step(bunch, ele, include_image, t_now, dt_step, dt_next)
Routine to track a bunch of particles with space charge for one step using adaptive step size control and determine appropriate step size for the next step
| Parameters: |
|
|---|
| Returns: |
|
|---|
sc_step¶
Fortran source: bmad/space_charge/space_charge_mod.f90
sc_step(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, include_image: bool, t_end: typing.SupportsFloat | typing.SupportsIndex, sc_field: pybmad._pybmad.EmFieldStructArray1D) -> pybmad._pybmad.ScStep
Subroutine sc_step(bunch, ele, include_image, t_end, n_emit)
Subroutine to track a bunch through a given time step with space charge
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_active_fixer¶
Fortran source: bmad/modules/fixer_mod.f90
set_active_fixer(fixer: pybmad._pybmad.EleStruct, turn_on: bool | None = None) -> pybmad._pybmad.CoordStruct
Subroutine set_active_fixer(fixer, turn_on, orbit)
Set the acvitive fixer element. All other fixer/beginning_ele elements in the branch will be deactivated.
If turn_on is True (default), the fixer argument becomes the active fixer. If turn_on is False, and fixer%is_on is also False, there is nothing to be done. If turn_on is False, and fixer%is_on is True, turn this fixer off and turn on the beginning element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_custom_attribute_name¶
Fortran source: bmad/modules/attribute_mod.f90
set_custom_attribute_name(custom_name: str, custom_index: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Subroutine set_custom_attribute_name (custom_name, err_flag, custom_index)
Routine to add custom element attributes to the element attribute name table.
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_ele_attribute¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ele_attribute(ele: pybmad._pybmad.EleStruct, set_string: str, err_print_flag: bool | None = None, set_lords: bool | None = None) -> pybmad._pybmad.SetEleAttribute
Wrapper for Fortran routine set_ele_attribute
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_ele_defaults¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ele_defaults(ele: pybmad._pybmad.EleStruct, do_allocate: bool | None = None) -> None
Wrapper for Fortran routine set_ele_defaults
| Parameters: |
|
|---|
set_ele_name¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ele_name(ele: pybmad._pybmad.EleStruct, name: str) -> None
Wrapper for Fortran routine set_ele_name
| Parameters: |
|
|---|
set_ele_real_attribute¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ele_real_attribute(ele: pybmad._pybmad.EleStruct, attrib_name: str, value: typing.SupportsFloat | typing.SupportsIndex, err_print_flag: bool | None = None) -> bool
Wrapper for Fortran routine set_ele_real_attribute
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_ele_status_stale¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ele_status_stale(ele: pybmad._pybmad.EleStruct, status_group: typing.SupportsInt | typing.SupportsIndex, set_slaves: bool | None = None, old_eles: pybmad._pybmad.ElePointerStructAlloc1D | None = None) -> None
Wrapper for Fortran routine set_ele_status_stale
| Parameters: |
|
|---|
set_flags_for_changed_attribute¶
Fortran sources (overloaded):
set_flags_for_changed_integer_attribute:bmad/modules/bmad_routine_interface.f90set_flags_for_changed_logical_attribute:bmad/modules/bmad_routine_interface.f90set_flags_for_changed_lat_attribute:bmad/modules/bmad_routine_interface.f90set_flags_for_changed_real_attribute:bmad/modules/bmad_routine_interface.f90
set_flags_for_changed_attribute(args, *kwargs) Overloaded function.
- set_flags_for_changed_attribute(ele: pybmad._pybmad.EleStruct, attrib: typing.SupportsInt | typing.SupportsIndex, set_dependent: bool | None = None) -> None
Subroutine set_flags_for_changed_attribute (...)
Routine to mark an element or lattice as modified. Also will do some dependent variable bookkeeping when a particular attribute has been altered.
This routine should be called after the attribute has been set.
set_flags_for_changed_attribute is an overloaded name for: set_flags_for_changed_lat_attribute (lat, set_dependent) set_flags_for_changed_real_attribute (ele, real_attrib, set_dependent) set_flags_for_changed_inteter_attribute (ele, int_attrib, set_dependent) set_flags_for_changed_logical_attribute (ele, logic_attrib, set_dependent) set_flags_for_changed_all_attribute (ele, all_attrib, set_dependent)
The set_flags_for_changed_lat_attribute (lat) routine is used when one does not know what has changed and wants a complete bookkeeping done.
NOTE: The attribute argument MUST be the component that was changed. For example: ele%value(x_offset\() = off_value call set_flags_for_changed_attribute (ele, ele%value(x_offset\))) And NOT: call set_flags_for_changed_attribute (ele, off_value) ! WRONG
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
set_fringe_on_off¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_fringe_on_off(fringe_at: typing.SupportsFloat | typing.SupportsIndex, ele_end: typing.SupportsInt | typing.SupportsIndex, on_or_off: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.SetFringeOnOff
Wrapper for Fortran routine set_fringe_on_off
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_lords_status_stale¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_lords_status_stale(ele: pybmad._pybmad.EleStruct, stat_group: typing.SupportsInt | typing.SupportsIndex, control_bookkeeping: bool | None = None, flag: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine set_lords_status_stale
| Parameters: |
|
|---|
set_on_off¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_on_off(key: typing.SupportsInt | typing.SupportsIndex, lat: pybmad.pybmad.LatStruct, switch: typing.SupportsInt | typing.SupportsIndex, orb: pybmad._pybmad.CoordStructArray1D | None = None, use_ref_orb: bool | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, saved_values: pybmad._pybmad.RealAlloc1D | None = None, attribute: str | None = None, set_val: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine set_on_off
| Parameters: |
|
|---|
set_orbit_to_zero¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_orbit_to_zero(orbit: pybmad._pybmad.CoordStructArray1D, n1: typing.SupportsInt | typing.SupportsIndex, n2: typing.SupportsInt | typing.SupportsIndex, ix_noset: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine set_orbit_to_zero
| Parameters: |
|
|---|
set_ptc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ptc(e_tot: typing.SupportsFloat | typing.SupportsIndex | None = None, particle: typing.SupportsInt | typing.SupportsIndex | None = None, taylor_order: typing.SupportsInt | typing.SupportsIndex | None = None, integ_order: typing.SupportsInt | typing.SupportsIndex | None = None, n_step: typing.SupportsInt | typing.SupportsIndex | None = None, no_cavity: bool | None = None, force_init: bool | None = None) -> None
Wrapper for Fortran routine set_ptc
| Parameters: |
|
|---|
set_ptc_base_state¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_ptc_base_state(component: str, set_val: bool) -> bool
Wrapper for Fortran routine set_ptc_base_state
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_ptc_com_pointers¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
set_ptc_com_pointers() -> None
Subroutine set_ptc_com_pointers ()
Routine to set ptc_com pointers to PTC global variables.
set_ptc_quiet¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
set_ptc_quiet(channel: typing.SupportsInt | typing.SupportsIndex, set: bool, old_val: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.SetPtcQuiet
Subroutine set_ptc_quiet (channel, set, old_val)
Routine to set the lielib_print(:) array or c_verbose logical to suppress informational messages that can clutter the output from a program using PTC.
Note: Only suppress printing if ptc_com%print_info_messages = F.
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_ptc_verbose¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
set_ptc_verbose(on: bool) -> None
Wrapper for Fortran routine set_ptc_verbose
| Parameters: |
|
|---|
set_pwd_ele¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
set_pwd_ele(lat: pybmad._pybmad.LatStruct, mode0: pybmad._pybmad.NormalModesStruct, inductance: typing.SupportsFloat | typing.SupportsIndex) -> None
Subroutine set_pwd_ele(lat,mode0,inductance)
Simulates the effect of potential well distortion by adjusting lat%ele(ix_pwd)%taylor(6)%term(2)%coef for an element in the lattice. This element will apply a pz kick based on the z coordinate. Element is assumed to be at lat%ele(1). The ibs_ring driver program inserts a taylor element into lat%ele(1) if set to perform pwd calculations.
| Parameters: |
|
|---|
set_status_flags¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_status_flags(stat: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.BookkeepingStateStruct
Wrapper for Fortran routine set_status_flags
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_tune¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_tune(phi_a_set: typing.SupportsFloat | typing.SupportsIndex, phi_b_set: typing.SupportsFloat | typing.SupportsIndex, dk1: pybmad._pybmad.RealArray1D, eles: pybmad._pybmad.ElePointerStructArray1D, branch: pybmad._pybmad.BranchStruct, orb: pybmad._pybmad.CoordStructAlloc1D, print_err: bool | None = None) -> bool
Wrapper for Fortran routine set_tune
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_twiss(branch: pybmad._pybmad.BranchStruct, twiss_ele: pybmad._pybmad.EleStruct, ix_ele: typing.SupportsInt | typing.SupportsIndex, match_deta_ds: bool, err_flag: bool, print_err: bool | None = None) -> None
Wrapper for Fortran routine set_twiss
| Parameters: |
|
|---|
set_z_tune¶
Fortran source: bmad/modules/bmad_routine_interface.f90
set_z_tune(branch: pybmad._pybmad.BranchStruct, z_tune: typing.SupportsFloat | typing.SupportsIndex, print_err: bool | None = None) -> bool
Wrapper for Fortran routine set_z_tune
| Parameters: |
|
|---|
| Returns: |
|
|---|
settable_dep_var_bookkeeping¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
settable_dep_var_bookkeeping(ele: pybmad._pybmad.EleStruct) -> None
Subroutine settable_dep_var_bookkeeping (ele)
Subroutine to initialize dependent variables in an element.
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
setup_high_energy_space_charge_calc¶
Fortran source: bmad/space_charge/high_energy_space_charge_mod.f90
setup_high_energy_space_charge_calc(calc_on: bool, branch: pybmad._pybmad.BranchStruct, n_part: typing.SupportsFloat | typing.SupportsIndex, mode: pybmad._pybmad.NormalModesStruct, beam_init: pybmad._pybmad.BeamInitStruct | None = None, closed_orb: pybmad._pybmad.CoordStructArray1D | None = None) -> None
Subroutine setup_high_energy_space_charge_calc (calc_on, branch, n_part, mode, beam_init, closed_orb)
Routine to initialize constants needed by the ultra relativistic space charge tracking routine track1_high_energy_space_charge. This setup routine must be called if the lattice or any of the other input parameters are changed.
Parameters used: a-mode emittance b-mode emittance sig_z bunch length sig_pz relative energy spread
| Parameters: |
|
|---|
sigma_mat_ptc_to_bmad¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
sigma_mat_ptc_to_bmad(sigma_mat_ptc: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], beta0: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"]
Subroutine sigma_mat_ptc_to_bmad (sigma_mat_ptc, beta0, sigma_mat_bmad)
Routine to convert a PTC sigma matrix to a Bmad sigma matrix. The conversion includes the conversion between Bmad and PTC time coordinate systems.
Since PTC uses delta_E/P0c and Bmad uses delta_P/P0c coordinates, and since the relationship between delta_E and delta_P is nonlinear, this routine simplifies the calculation and assumes that the particle beta is constant over the range of particle energies.
| Parameters: |
|
|---|
| Returns: |
|
|---|
significant_difference¶
Fortran source: bmad/modules/bmad_routine_interface.f90
significant_difference(value1: typing.SupportsFloat | typing.SupportsIndex, value2: typing.SupportsFloat | typing.SupportsIndex, abs_tol: typing.SupportsFloat | typing.SupportsIndex | None = None, rel_tol: typing.SupportsFloat | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine significant_difference
| Parameters: |
|
|---|
| Returns: |
|
|---|
skip_ele_blender¶
Fortran source: bmad/interface/blender_interface_mod.f90
skip_ele_blender(ele: pybmad._pybmad.EleStruct, skip: bool) -> None
Wrapper for Fortran routine skip_ele_blender
| Parameters: |
|
|---|
slice_lattice¶
Fortran source: bmad/modules/bmad_routine_interface.f90
slice_lattice(lat: pybmad._pybmad.LatStruct, ele_list: str, do_bookkeeping: bool | None = None, set_phase_zero: bool | None = None) -> bool
Wrapper for Fortran routine slice_lattice
| Parameters: |
|
|---|
| Returns: |
|
|---|
soft_quadrupole_edge_kick¶
Fortran source: bmad/modules/fringe_mod.f90
soft_quadrupole_edge_kick(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, particle_at: typing.SupportsInt | typing.SupportsIndex, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Subroutine soft_quadrupole_edge_kick (ele, param, particle_at, orbit, mat6, make_matrix)
Routine to add the SAD "linear" soft edge (for finite f1 or f2). This routine assumes that the particle orbit has been rotated to the element reference frame. This routine is called with sad_mult and quadrupole elements.
| Parameters: |
|
|---|
sol_quad_mat6_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
sol_quad_mat6_calc(ks_in: typing.SupportsFloat | typing.SupportsIndex, k1_in: typing.SupportsFloat | typing.SupportsIndex, tilt: typing.SupportsFloat | typing.SupportsIndex, length: typing.SupportsFloat | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine sol_quad_mat6_calc
| Parameters: |
|
|---|
solve_psi_adaptive¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
solve_psi_adaptive(t0: typing.SupportsFloat | typing.SupportsIndex, t1: typing.SupportsFloat | typing.SupportsIndex, p0: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]) -> float
Subroutine solve_psi_adaptive(t0,t1,p0,args,p1)
Solve dpsi/dt for psi(t1) using adaptive steps and method: "Implicit Bulirsch-Stoer method of Bader and Deuflhard."
The boundary condition p0 is psi(t0)
| Parameters: |
|
|---|
| Returns: |
|
|---|
solve_psi_fixed_steps¶
Fortran source: bmad/multiparticle/longitudinal_profile_mod.f90
solve_psi_fixed_steps(t0: typing.SupportsFloat | typing.SupportsIndex, t1: typing.SupportsFloat | typing.SupportsIndex, p0: typing.SupportsFloat | typing.SupportsIndex, args: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"], t: pybmad._pybmad.RealArray1D, p: pybmad._pybmad.RealArray1D) -> None
Subroutine solve_psi_fixed_steps(t0,t1,p0,args,t,p)
Solve dpsi/dt for psi(t1) using fixed steps and method: "Implicit Bulirsch-Stoer method of Bader and Deuflhard."
The boundary condition p0 is psi(t0).
Number of steps is determined by SIZE(p).
| Parameters: |
|
|---|
sort_complex_taylor_terms¶
Fortran source: bmad/modules/complex_taylor_mod.f90
sort_complex_taylor_terms(complex_taylor_in: pybmad._pybmad.ComplexTaylorStruct) -> pybmad._pybmad.ComplexTaylorStruct
subroutine sort_complex_taylor_terms (complex_taylor_in, complex_taylor_sorted)
Subroutine to sort the complex_taylor terms from "lowest" to "highest" of a complex_taylor series. This subroutine is needed because what comes out of PTC is not sorted.
Uses function complex_taylor_exponent_index to sort.
Note: complex_taylor_sorted needs to have been initialized. Note: complex_taylor_sorted cannot be complex_taylor_in. That is it is not legal to write: call sort_complex_taylor_terms (this_complex_taylor, this_complex_taylor)
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_dn_dpz_from_mat8¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_dn_dpz_from_mat8(mat_1turn: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(8)"]], "FixedSize(8)"], dn_dpz_partial: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"] | None = None) -> pybmad._pybmad.SpinDnDpzFromMat8
Wrapper for Fortran routine spin_dn_dpz_from_mat8
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_dn_dpz_from_qmap¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_dn_dpz_from_qmap(orb_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], q_map: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(7)"]], "FixedSize(4)"], dn_dpz_partial: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"], dn_dpz_partial2: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"], n0: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None) -> pybmad._pybmad.SpinDnDpzFromQmap
Wrapper for Fortran routine spin_dn_dpz_from_qmap
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_map1_normalize¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_map1_normalize(spin1: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(7)"]], "FixedSize(4)"]) -> None
Wrapper for Fortran routine spin_map1_normalize
| Parameters: |
|
|---|
spin_mat8_resonance_strengths¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_mat8_resonance_strengths(orb_evec: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], mat8: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"]) -> pybmad._pybmad.SpinMat8ResonanceStrengths
Wrapper for Fortran routine spin_mat8_resonance_strengths
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_mat_to_eigen¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_mat_to_eigen(orb_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], spin_map: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(7)"]], "FixedSize(4)"]) -> pybmad._pybmad.SpinMatToEigen
Wrapper for Fortran routine spin_mat_to_eigen
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_omega¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_omega(field: pybmad._pybmad.EmFieldStruct, orbit: pybmad._pybmad.CoordStruct, sign_z_vel: typing.SupportsInt | typing.SupportsIndex, omega: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], phase_space_coords: bool | None = None) -> None
Wrapper for Fortran routine spin_omega
| Parameters: |
|
|---|
spin_quat_resonance_strengths¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_quat_resonance_strengths(orb_evec: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], spin_q: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(7)"]], "FixedSize(4)"]) -> pybmad._pybmad.SpinQuatResonanceStrengths
Wrapper for Fortran routine spin_quat_resonance_strengths
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_taylor_to_linear¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spin_taylor_to_linear(spin_taylor: pybmad._pybmad.TaylorStructArray1D, normalize: bool, dref_orb: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], is_on: bool) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(7)"]], "FixedSize(4)"]
Wrapper for Fortran routine spin_taylor_to_linear
| Parameters: |
|
|---|
| Returns: |
|
|---|
spinor_to_polar¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spinor_to_polar(spinor: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]) -> pybmad._pybmad.SpinPolarStruct
Wrapper for Fortran routine spinor_to_polar
| Parameters: |
|
|---|
| Returns: |
|
|---|
spinor_to_vec¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spinor_to_vec(spinor: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]) -> typing.Annotated[list[float], "FixedSize(3)"]
Wrapper for Fortran routine spinor_to_vec
| Parameters: |
|
|---|
| Returns: |
|
|---|
spline_fit_orbit¶
Fortran source: bmad/modules/bmad_routine_interface.f90
spline_fit_orbit(start_orb: pybmad._pybmad.CoordStruct, end_orb: pybmad._pybmad.CoordStruct, spline_x: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], spline_y: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> None
Wrapper for Fortran routine spline_fit_orbit
| Parameters: |
|
|---|
split_expression_string¶
Fortran source: bmad/modules/expression_mod.f90
split_expression_string(expr: str, width: typing.SupportsInt | typing.SupportsIndex, indent: typing.SupportsInt | typing.SupportsIndex, break_str: str | None = None) -> pybmad._pybmad.CharacterAlloc1D
Subroutine split_expression_string (expr, width, indent, lines)
Routine to break an expression into a number of lines for a nicer display. Used when printing expressions.
| Parameters: |
|
|---|
| Returns: |
|
|---|
split_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
split_lat(lat: pybmad._pybmad.LatStruct, s_split: typing.SupportsFloat | typing.SupportsIndex, ix_branch: typing.SupportsInt | typing.SupportsIndex, add_suffix: bool | None = None, check_sanity: bool | None = None, save_null_drift: bool | None = None, choose_max: bool | None = None, ix_insert: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.SplitLat
Wrapper for Fortran routine split_lat
| Parameters: |
|
|---|
| Returns: |
|
|---|
sprint_spin_taylor_map¶
Fortran source: bmad/modules/bmad_routine_interface.f90
sprint_spin_taylor_map(ele: pybmad._pybmad.EleStruct, start_orbit: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"] | None = None) -> None
Wrapper for Fortran routine sprint_spin_taylor_map
| Parameters: |
|
|---|
sr_longitudinal_wake_particle¶
Fortran source: bmad/multiparticle/wake_mod.f90
sr_longitudinal_wake_particle(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine sr_longitudinal_wake_particle (ele, orbit)
Routine to apply the short-range wake longitudinal component kick to a particle and then add to the existing longitudinal wake the contribution from the particle.
| Parameters: |
|
|---|
sr_transverse_wake_particle¶
Fortran source: bmad/multiparticle/wake_mod.f90
sr_transverse_wake_particle(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine sr_transverse_wake_particle (ele, orbit)
Subroutine to apply the short-range wake transverse component of the kick to a particle and then add to the existing transverse wake the contribution from the particle.
| Parameters: |
|
|---|
sr_z_long_wake¶
Fortran source: bmad/multiparticle/wake_mod.f90
sr_z_long_wake(ele: pybmad._pybmad.EleStruct, bunch: pybmad._pybmad.BunchStruct, z_ave: typing.SupportsFloat | typing.SupportsIndex) -> None
Subroutine sr_z_long_wake (ele, bunch, z_ave)
Subroutine to apply the short-range z-wake kick to a particle.
| Parameters: |
|
|---|
srdt_calc¶
Fortran source: bmad/modules/srdt_mod.f90
srdt_calc(lat: pybmad._pybmad.LatStruct, order: typing.SupportsInt | typing.SupportsIndex, n_slices_gen_opt: typing.SupportsInt | typing.SupportsIndex | None = None, n_slices_sxt_opt: typing.SupportsInt | typing.SupportsIndex | None = None, per_ele_out: pybmad._pybmad.SummationRdtStructAlloc1D | None = None) -> pybmad._pybmad.SummationRdtStruct
Subroutine srdt_calc(lat, srdt_sums, order, n_slices_gen_opt, n_slices_sxt_opt)
Calculate summation RDT terms up to order=1 or order=2 while slicing sextupoles n_slices_sxt_opt times and all other elements n_slices_gen_opt times.
These formulas are documented in "The Sextupole Scheme for the Swiss Light Source (SLS): An Analytic Approach" by Johan Bengtsson. SLS Note 9/97.
The 2nd order formulas are documented in "Second-order driving terms due to sextupoles and chromatic effects of quadrupoles" by Chun-xi Wang. AOP-TN-2009-020.
| Parameters: |
|
|---|
| Returns: |
|
|---|
srdt_lsq_solution¶
Fortran source: bmad/modules/srdt_mod.f90
srdt_lsq_solution(lat: pybmad._pybmad.LatStruct, var_indexes: pybmad._pybmad.IntArray1D, n_slices_gen_opt: typing.SupportsInt | typing.SupportsIndex | None = None, n_slices_sxt_opt: typing.SupportsInt | typing.SupportsIndex | None = None, chrom_set_x_opt: typing.SupportsFloat | typing.SupportsIndex | None = None, chrom_set_y_opt: typing.SupportsFloat | typing.SupportsIndex | None = None, weight_in: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(10)"] | None = None) -> pybmad._pybmad.RealAlloc1D
Subroutine srdt_lsq_solution(lat, var_indexes, ls_soln, n_slices_gen_opt, n_slices_sxt_opt, chrom_set_x_opt, chrom_set_y_opt, weight_in)
Given lat, finds K2 moments that set the chromaticity and zeros-out the real and complex parts of the first order driving terms, that minimizes the sum of the squares of the K2 moments. i.e. the weakest sextupole scheme that sets chromaticity and zeros out the first order terms.
Note: This subroutine does not, in its present form, work well with knobs, overlays, or in lattices where multiple elements have the same name.
This subroutine assumes that Nsext > 18.
| Parameters: |
|
|---|
| Returns: |
|
|---|
start_branch_at¶
Fortran source: bmad/modules/bmad_routine_interface.f90
start_branch_at(lat: pybmad._pybmad.LatStruct, ele_start: str, move_end_marker: bool) -> bool
Wrapper for Fortran routine start_branch_at
| Parameters: |
|
|---|
| Returns: |
|
|---|
stream_ele_end¶
Fortran source: bmad/modules/bmad_routine_interface.f90
stream_ele_end(physical_end: typing.SupportsInt | typing.SupportsIndex, ele_orientation: typing.SupportsInt | typing.SupportsIndex) -> int
Wrapper for Fortran routine stream_ele_end
| Parameters: |
|
|---|
| Returns: |
|
|---|
string_attrib¶
Fortran source: bmad/modules/attribute_mod.f90
string_attrib(attrib_name: str, ele: pybmad._pybmad.EleStruct) -> str
Subroutine string_attrib (attrib_name, ele, attrib_value)
Routine to return the value of a string attribute of a lattice element. This routine is useful when attrib_name is specified by the program user.
For example: call string_attrib ('NAME', ele, attrib_value) ! Will return attrib_value = ele%name
| Parameters: |
|
|---|
| Returns: |
|
|---|
strong_beam_sigma_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
strong_beam_sigma_calc(ele: pybmad._pybmad.EleStruct, s_pos: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.StrongBeamSigmaCalc
Wrapper for Fortran routine strong_beam_sigma_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
strong_beam_strength¶
Fortran source: bmad/modules/bmad_routine_interface.f90
strong_beam_strength(ele: pybmad._pybmad.EleStruct) -> float
Wrapper for Fortran routine strong_beam_strength
| Parameters: |
|
|---|
| Returns: |
|
|---|
surface_grid_displacement¶
Fortran source: bmad/photon/photon_utils_mod.f90
surface_grid_displacement(ele: pybmad._pybmad.EleStruct, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, extend_grid: bool | None = None) -> pybmad._pybmad.SurfaceGridDisplacement
Subroutine surface_grid_displacement (ele, x, y, err_flag, z, dz_dxy, extend_grid)
Routine to add in the z displacement defined by the grid
| Parameters: |
|
|---|
| Returns: |
|
|---|
switch_attrib_value_name¶
Fortran source: bmad/modules/attribute_mod.f90
switch_attrib_value_name(attrib_name: str, attrib_value: typing.SupportsFloat | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.SwitchAttribValueName
Function switch_attrib_value_name (attrib_name, attrib_value, ele, is_default, name_list) result (attrib_val_name)
Routine to return the name corresponding to the value of a given switch attribute.
This routine is for "switch" and "species" attributes. For example, the "aperture_type" attribute can have value names of "Entrance_End", "Exit_End", etc.
Optionally, this routine can determine if the attribute value corresponds to the default value. That is, the value that the attribute would have if not specified in the lattice file.
Use the routine attribute_type to first test if the type of the attribute corresponds to is_switch$.
| Parameters: |
|
|---|
| Returns: |
|
|---|
symp_lie_bmad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
symp_lie_bmad(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None, offset_ele: bool | None = None) -> pybmad._pybmad.TrackStruct
Wrapper for Fortran routine symp_lie_bmad
| Parameters: |
|
|---|
| Returns: |
|
|---|
t6_to_b123¶
Fortran source: bmad/modules/mode3_mod.f90
t6_to_b123(t6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], abz_tunes: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> pybmad._pybmad.T6ToB123
Subroutine t6_to_B123(N, abz_tunes, B1, B2, B3, err_flag)
This decomposes the one-turn matrix according to Equation 56 from "Alternative approach to general coupled linear optics" by A. Wolski. PRSTAB.
Note that a sigma matrix can be assembeled from: sigma = B1emit_a + B2emit_b + B3*emit_c
| Parameters: |
|
|---|
| Returns: |
|
|---|
taper_mag_strengths¶
Fortran source: bmad/modules/bmad_routine_interface.f90
taper_mag_strengths(lat: pybmad.pybmad.LatStruct, ref_lat: pybmad._pybmad.LatStruct | None = None, except: str | None = None, err_flag: bool | None = None) -> None
Wrapper for Fortran routine taper_mag_strengths
| Parameters: |
|
|---|
target_min_max_calc¶
Fortran source: bmad/photon/track1_photon_mod.f90
target_min_max_calc(r_corner1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], r_corner2: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], y_min: typing.SupportsFloat | typing.SupportsIndex, y_max: typing.SupportsFloat | typing.SupportsIndex, phi_min: typing.SupportsFloat | typing.SupportsIndex, phi_max: typing.SupportsFloat | typing.SupportsIndex, initial: bool | None = None) -> pybmad._pybmad.TargetMinMaxCalc
Subroutine target_min_max_calc (r_corner1, r_corner2, y_min, y_max, phi_min, phi_max, initial)
Routine to calculate the min/max values for (y, phi). min/max values are cumulative.
| Parameters: |
|
|---|
| Returns: |
|
|---|
target_rot_mats¶
Fortran source: bmad/photon/track1_photon_mod.f90
target_rot_mats(r_center: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> pybmad._pybmad.TargetRotMats
Subroutine target_rot_mats (r_center, w_to_target, w_to_ele)
Routine to calculate the rotation matrices between ele coords and "target" coords. By definition, in target coords r_center = [0, 0, 1].
| Parameters: |
|
|---|
| Returns: |
|
|---|
taylor_equal_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
taylor_equal_taylor(taylor1: pybmad._pybmad.TaylorStruct, taylor2: pybmad._pybmad.TaylorStruct) -> None
Wrapper for Fortran routine taylor_equal_taylor
| Parameters: |
|
|---|
taylor_inverse¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
taylor_inverse(taylor_in: pybmad._pybmad.TaylorStructArray1D, taylor_inv: pybmad._pybmad.TaylorStructArray1D) -> bool
Subroutine taylor_inverse (taylor_in, taylor_inv, err)
Subroutine to invert a taylor map. Since the inverse map is truncated, it is not exact.
| Parameters: |
|
|---|
| Returns: |
|
|---|
taylor_propagate1¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
taylor_propagate1(orb_taylor: pybmad._pybmad.TaylorStructArray1D, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, ref_in: pybmad._pybmad.CoordStruct | None = None, spin_taylor: pybmad._pybmad.TaylorStructArray1D | None = None) -> bool
Subroutine taylor_propagate1 (orb_taylor, ele, param, err_flag, ref_in, spin_taylor)
Subroutine to track (symplectic integration) a orbital map, and optionally a spin map, through an element. The spin tracking is only done if spin_taylor is present and bmad_com%spin_tracking_on = T. The alternative routine, if ele has a taylor map, is concat_taylor.
This routine will fail if there is no corresponding ptc fibre for this element. In general, the transfer_map_calc routine should be used instead.
| Parameters: |
|
|---|
| Returns: |
|
|---|
taylor_to_mad_map¶
Fortran source: bmad/modules/mad_mod.f90
taylor_to_mad_map(taylor: pybmad._pybmad.TaylorStructArray1D, energy: pybmad._pybmad.MadEnergyStruct) -> pybmad._pybmad.MadMapStruct
Subroutine taylor_to_mad_map (taylor, energy, map)
Subroutine to convert a Taylor map to a mad order 2 map. If any of the Taylor terms have order greater than 2 they are ignored.
| Parameters: |
|
|---|
| Returns: |
|
|---|
taylors_equal_taylors¶
Fortran source: bmad/modules/bmad_routine_interface.f90
taylors_equal_taylors(taylor1: pybmad._pybmad.TaylorStructArray1D, taylor2: pybmad._pybmad.TaylorStructArray1D) -> None
Wrapper for Fortran routine taylors_equal_taylors
| Parameters: |
|
|---|
tilt_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
tilt_coords(tilt_val: typing.SupportsFloat | typing.SupportsIndex, coord: pybmad._pybmad.RealArray1D, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine tilt_coords
| Parameters: |
|
|---|
tilt_coords_photon¶
Fortran source: bmad/modules/bmad_routine_interface.f90
tilt_coords_photon(tilt_val: typing.SupportsFloat | typing.SupportsIndex, coord: pybmad._pybmad.RealArray1D, w_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"] | None = None) -> None
Wrapper for Fortran routine tilt_coords_photon
| Parameters: |
|
|---|
tilt_mat6¶
Fortran source: bmad/modules/bmad_routine_interface.f90
tilt_mat6(mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], tilt: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine tilt_mat6
| Parameters: |
|
|---|
to_eta_reading¶
Fortran source: bmad/modules/measurement_mod.f90
to_eta_reading(eta_actual: pybmad._pybmad.RealArray1D, ele: pybmad._pybmad.EleStruct, axis: typing.SupportsInt | typing.SupportsIndex, add_noise: bool) -> pybmad._pybmad.ToEtaReading
Subroutine to_eta_reading (eta, ele, axis, add_noise, reading, err)
Compute the measured dispersion reading given the true dispersion and the monitor offsets, noise, etc.
This routine will only give a nonzero reading for Bmad markers, monitors, and instruments.
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_fieldmap_coords¶
Fortran source: bmad/modules/em_field_mod.f90
to_fieldmap_coords(ele: pybmad._pybmad.EleStruct, local_orb: pybmad._pybmad.CoordStruct, s_body: typing.SupportsFloat | typing.SupportsIndex, ele_anchor_pt: typing.SupportsInt | typing.SupportsIndex, r0: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], curved_ref_frame: bool) -> pybmad._pybmad.ToFieldmapCoords
Subroutine to_fieldmap_coords (ele, local_orb, s_body, ele_anchor_pt, r0, curved_ref_frame, x, y, z, cos_ang, sin_ang, err_flag)
Routine to return the (x,y,s) position relative to a field map.
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_orbit_reading¶
Fortran source: bmad/modules/measurement_mod.f90
to_orbit_reading(orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, axis: typing.SupportsInt | typing.SupportsIndex, add_noise: bool) -> pybmad._pybmad.ToOrbitReading
Subroutine to_orbit_reading (orb, ele, axis, add_noise, reading, err)
Calculate the measured reading on a bpm given the actual orbit and the BPM's offsets, noise, etc.
This routine will only give a nonzero reading for Bmad markers, monitors, and instruments.
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_phase_and_coupling_reading¶
Fortran source: bmad/modules/measurement_mod.f90
to_phase_and_coupling_reading(ele: pybmad._pybmad.EleStruct, add_noise: bool) -> pybmad._pybmad.ToPhaseAndCouplingReading
Subroutine to_phase_and_coupling_reading (ele, add_noise, reading, err)
Find the measured coupling values given the actual ones
This routine will only give a nonzero reading for Bmad markers, monitors, and instruments.
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_photon_angle_coords¶
Fortran source: bmad/photon/photon_target_mod.f90
to_photon_angle_coords(orb_in: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.CoordStruct
Function to_photon_angle_coords (orb_in, ele) result (orb_out)
Routine to convert from standard photon coords to "angle" coords defined as: x, angle_x, y, angle_y, z, E-E_ref
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_surface_coords¶
Fortran source: bmad/modules/bmad_routine_interface.f90
to_surface_coords(lab_orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.CoordStruct
Wrapper for Fortran routine to_surface_coords
| Parameters: |
|
|---|
| Returns: |
|
|---|
touschek_lifetime¶
Fortran source: bmad/multiparticle/touschek_mod.f90
touschek_lifetime(mode: pybmad._pybmad.NormalModesStruct, lat: pybmad._pybmad.LatStruct) -> float
Subroutine touschek_lifetime(mode, Tl, lat)
Calculates the touschek lifetime for a lattice by calling touschek_rate1 for each element. The loss rate at each element is averaged over one turn to obtain the lifetime.
This function assumes that the twiss parameters and closed orbit have been calculated, and that mode has been populated.
This subroutine assumes a fixed momentum aperture. The loss rate at each element uses the same momentum aperture, mode%pz_aperture.
A common way to call this function is to first populate mode using radiation integrals. If an ideal lattice is used, the vertical emittance must also be set to a reasonable value. If the vertical emittance is due only to quantum excitation, then it will likely be several orders of magnitude smaller than any real physical situation, in which case the integral in this function will have problems converging.
In addition to setting mode, also set lat%param%n_part to the number of particles per bunch.
| Parameters: |
|
|---|
| Returns: |
|
|---|
touschek_rate1¶
Fortran source: bmad/multiparticle/touschek_mod.f90
touschek_rate1(mode: pybmad._pybmad.NormalModesStruct, lat: pybmad._pybmad.LatStruct, ix: typing.SupportsInt | typing.SupportsIndex | None = None, s: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Subroutine touschek_rate1(mode, rate, lat, ix, s)
Calculates the touschek rate at the location specified by s or ix This calculation is based on Piwinski 1998 "The Touschek Effect In Strong Focusing Storage Rings". This is the most general case, equation 31.
This function uses twiss_and_track_at_s to determine the Twiss parameters at the location s or element index ix.
A common way to call this function is to first populate mode using radiation integrals. If an ideal lattice is used, the vertical emittance must also be set to a reasonable value. If the vertical emittance is due only to quantum excitation, then it will likely be several orders of magnitude smaller than any real physical situation, in which case the integral in this function will have problems converging. Additionally, mode%pz_aperture needs to be set to the momentum aperture.
In addition to setting mode, also set lat%param%n_part to the number of particles per bunch.
IMPORTANT NOTE: If the lattice type is a circular lattice, then mode%a%emittance and mode%b%emittance are assumed to contain the normalized emittences. If lattice geometry is open, the emittances are assumed to be unnormalized.
IMPORTANT NOTE: The output of this subroutine is the loss rate assuming that two particles are lost per collision, one with too much energy, and one with too little energy. This agrees with Piwinski's original derivation, which assumes that the positive energy aperture is equal in magnitude to the negative energy aperture. If you are studying an accelerator with a non-symmetric energy aperture, then this subroutine should be called twice, once with the positive aperture, and once with the negative aperture, and rate from each call should be halved and summed.
| Parameters: |
|
|---|
| Returns: |
|
|---|
touschek_rate1_zap¶
Fortran source: bmad/multiparticle/touschek_mod.f90
touschek_rate1_zap(mode: pybmad._pybmad.NormalModesStruct, rate: typing.SupportsFloat | typing.SupportsIndex, lat: pybmad._pybmad.LatStruct, ix: typing.SupportsInt | typing.SupportsIndex | None = None, s: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine touschek_rate1_zap
| Parameters: |
|
|---|
track1¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1(start_orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, track: pybmad._pybmad.TrackStruct | None = None, ignore_radiation: bool | None = None, make_map1: bool | None = None, init_to_edge: bool | None = None) -> pybmad._pybmad.Track1
Wrapper for Fortran routine track1
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_beam¶
Fortran source: bmad/multiparticle/beam_mod.f90
track1_beam(beam: pybmad._pybmad.BeamStruct, ele: pybmad._pybmad.EleStruct, centroid: pybmad._pybmad.CoordStructArray1D | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Subroutine track1_beam (beam, ele, err, centroid, direction)
Subroutine to track a beam of particles through an element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_bmad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_bmad(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> pybmad._pybmad.Track1Bmad
Wrapper for Fortran routine track1_bmad
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_bmad_photon¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_bmad_photon(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> bool
Wrapper for Fortran routine track1_bmad_photon
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_bunch¶
Fortran source: bmad/multiparticle/beam_mod.f90
track1_bunch(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, centroid: pybmad._pybmad.CoordStructArray1D | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> bool
Subroutine track1_bunch (bunch, ele, err, centroid, direction, bunch_track)
Subroutine to track a bunch of particles through an element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_bunch_csr¶
Fortran source: bmad/space_charge/csr_and_space_charge_mod.f90
track1_bunch_csr(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, centroid: pybmad._pybmad.CoordStructArray1D, s_start: typing.SupportsFloat | typing.SupportsIndex | None = None, s_end: typing.SupportsFloat | typing.SupportsIndex | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> bool
Subroutine track1_bunch_csr (bunch, ele, centroid, err, s_start, s_end, bunch_track)
Routine to track a bunch of particles through an element with csr radiation effects.
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_bunch_csr3d¶
Fortran source: bmad/space_charge/csr_and_space_charge_mod.f90
track1_bunch_csr3d(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, centroid: pybmad._pybmad.CoordStructArray1D, s_start: typing.SupportsFloat | typing.SupportsIndex | None = None, s_end: typing.SupportsFloat | typing.SupportsIndex | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> bool
Subroutine track1_bunch_csr3d (bunch, ele, centroid, err, bunch_track)
EXPERIMENTAL. NOT CURRENTLY OPERATIONAL!
Routine to track a bunch of particles through an element using steady-state 3D CSR.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
The core routines are from the OpenCSR package developed at: https://github.com/ChristopherMayes/OpenCSR
track1_bunch_hom¶
Fortran source: bmad/multiparticle/beam_utils.f90
track1_bunch_hom(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, direction: typing.SupportsInt | typing.SupportsIndex | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> None
Subroutine track1_bunch_hom (bunch, ele, direction, bunch_track)
Subroutine to track a bunch of particles through an element including wakefields.
| Parameters: |
|
|---|
track1_bunch_space_charge¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_bunch_space_charge(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, track_to_same_s: bool | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> bool
Wrapper for Fortran routine track1_bunch_space_charge
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_crystal¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_crystal(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_crystal (ele, param, orbit)
Routine to track diffraction from a crystal.
| Parameters: |
|
|---|
track1_diffraction_plate_or_mask¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_diffraction_plate_or_mask(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_diffraction_plate_or_mask (ele, param, orbit)
Routine to track through diffraction plate and mask elements.
| Parameters: |
|
|---|
track1_high_energy_space_charge¶
Fortran source: bmad/space_charge/high_energy_space_charge_mod.f90
track1_high_energy_space_charge(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_high_energy_space_charge (ele, param, orbit)
Routine to apply the ultra-relative space charge kick to a particle at the end of an element. The routine setup_high_energy_space_charge_calc must be called initially before any tracking is done. This routine assumes a Gaussian bunch and is only valid with relativistic particles where the effect of the space charge is small.
| Parameters: |
|
|---|
track1_lens¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_lens(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_lens (ele, param, orbit)
Routine to track through a lens.
| Parameters: |
|
|---|
track1_linear¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_linear(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> None
Wrapper for Fortran routine track1_linear
| Parameters: |
|
|---|
track1_lr_wake¶
Fortran source: bmad/multiparticle/wake_mod.f90
track1_lr_wake(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct) -> None
Subroutine track1_lr_wake (bunch, ele)
Subroutine to put in the long-range wakes for particle tracking.
| Parameters: |
|
|---|
track1_mad¶
Fortran source: bmad/modules/mad_mod.f90
track1_mad(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> None
Subroutine track1_mad (orbit, ele, param)
Subroutine to track through an element using a 2nd order transfer map. Note: If map does not exist then one will be created.
| Parameters: |
|
|---|
track1_mirror¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_mirror(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_mirror (ele, param, orbit)
Routine to track reflection from a mirror.
| Parameters: |
|
|---|
track1_mosaic_crystal¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_mosaic_crystal(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_mosaic_crystal (ele, param, orbit)
Routine to track diffraction from a crystal.
| Parameters: |
|
|---|
track1_multilayer_mirror¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_multilayer_mirror(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_multilayer_mirror (ele, param, orbit)
Routine to track reflection from a multilayer_mirror. Basic equations are from Kohn, "On the Theory of Reflectivity of an X-Ray Multilayer Mirror".
| Parameters: |
|
|---|
track1_radiation¶
Fortran source: bmad/modules/radiation_mod.f90
track1_radiation(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, edge: typing.SupportsInt | typing.SupportsIndex) -> None
Subroutine track1_radiation (orbit, ele, edge)
Subroutine to apply a kick to a particle to account for radiation dampling and/or fluctuations.
For tracking through a given element, this routine should be called initially when the particle is at the entrance end and at the end when the particle is at the exit end, when the orbit is with respect to laboratory (not element body) coordinates. That is, each time this routine is called it applies half the radiation kick for the entire element.
Note: This routine is called by track1.
| Parameters: |
|
|---|
track1_radiation_center¶
Fortran source: bmad/modules/radiation_mod.f90
track1_radiation_center(orbit: pybmad._pybmad.CoordStruct, ele1: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct, rad_damp: bool | None = None, rad_fluct: bool | None = None) -> None
Subroutine track1_radiation_center (orbit, ele1, ele2, rad_damp, rad_fluct)
Used for elements that have been split in half: This routine applies a kick to a particle to account for radiation dampling and/or fluctuations.
Also see: track1_radiation.
| Parameters: |
|
|---|
track1_runge_kutta¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_runge_kutta(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> pybmad._pybmad.Track1RungeKutta
Wrapper for Fortran routine track1_runge_kutta
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_sample¶
Fortran source: bmad/photon/track1_photon_mod.f90
track1_sample(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, orbit: pybmad._pybmad.CoordStruct) -> None
Subroutine track1_sample (ele, param, orbit)
Routine to track reflection from a sample element.
| Parameters: |
|
|---|
track1_spin¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_spin(start_orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, end_orb: pybmad._pybmad.CoordStruct, make_quaternion: bool | None = None) -> None
Wrapper for Fortran routine track1_spin
| Parameters: |
|
|---|
track1_spin_integration¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_spin_integration(start_orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, end_orb: pybmad._pybmad.CoordStruct) -> None
Wrapper for Fortran routine track1_spin_integration
| Parameters: |
|
|---|
track1_spin_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_spin_taylor(start_orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> pybmad._pybmad.CoordStruct
Wrapper for Fortran routine track1_spin_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_sr_wake¶
Fortran source: bmad/multiparticle/wake_mod.f90
track1_sr_wake(bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct) -> None
Subroutine track1_sr_wake (bunch, ele)
Subroutine to apply the short range wake fields to a bunch.
| Parameters: |
|
|---|
track1_symp_lie_ptc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_symp_lie_ptc(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> pybmad._pybmad.TrackStruct
Wrapper for Fortran routine track1_symp_lie_ptc
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_taylor(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, taylor: pybmad._pybmad.TaylorStructArray1D | None = None, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track1_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
track1_time_runge_kutta¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track1_time_runge_kutta(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, t_end: typing.SupportsFloat | typing.SupportsIndex | None = None, dt_step: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.Track1TimeRungeKutta
Wrapper for Fortran routine track1_time_runge_kutta
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_beambeam¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_beambeam(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> pybmad._pybmad.TrackABeambeam
Wrapper for Fortran routine track_a_beambeam
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_bend¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_bend(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_bend
| Parameters: |
|
|---|
track_a_bend_photon¶
Fortran source: bmad/photon/track1_photon_mod.f90
track_a_bend_photon(orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, length: typing.SupportsFloat | typing.SupportsIndex) -> None
Subroutine track_a_bend_photon (orb, ele, length)
Routine to track a photon through a dipole bend. The photon is traveling in a straight line but the reference frame is curved in a circular shape.
| Parameters: |
|
|---|
track_a_capillary¶
Fortran source: bmad/photon/capillary_mod.f90
track_a_capillary(orb: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> None
Subroutine track_a_capillary (orb, ele)
Routine to track through a capillary.
| Parameters: |
|
|---|
track_a_converter¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_converter(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_converter
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_crab_cavity¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_crab_cavity(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_crab_cavity
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_drift¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_drift(orb: pybmad._pybmad.CoordStruct, length: typing.SupportsFloat | typing.SupportsIndex, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None, ele_orientation: typing.SupportsInt | typing.SupportsIndex | None = None, include_ref_motion: bool | None = None, time: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.TrackADrift
Wrapper for Fortran routine track_a_drift
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_drift_photon¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_drift_photon(orb: pybmad._pybmad.CoordStruct, length: typing.SupportsFloat | typing.SupportsIndex, phase_relative_to_ref: bool) -> None
Wrapper for Fortran routine track_a_drift_photon
| Parameters: |
|
|---|
track_a_foil¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_foil(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_foil
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_gkicker¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_gkicker(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_gkicker
| Parameters: |
|
|---|
track_a_lcavity¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_lcavity(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_lcavity
| Parameters: |
|
|---|
track_a_lcavity_old¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_lcavity_old(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_lcavity_old
| Parameters: |
|
|---|
track_a_mask¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_mask(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_mask
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_match¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_match(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, err_flag: bool | None = None, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_match
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_patch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_patch(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, drift_to_exit: bool | None = None, track_spin: bool | None = None, make_matrix: bool | None = None) -> pybmad._pybmad.TrackAPatch
Wrapper for Fortran routine track_a_patch
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_patch_photon¶
Fortran source: bmad/photon/track1_photon_mod.f90
track_a_patch_photon(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, drift_to_exit: bool | None = None, use_z_pos: bool | None = None) -> None
Subroutine track_a_patch_photon (ele, orbit, drift_to_exit, use_z_pos)
Routine to track through a patch element with a photon. The steps for tracking are: 1) Transform from entrance to exit coordinates. 2) Drift particle from the entrance to the exit coordinants.
| Parameters: |
|
|---|
track_a_pickup¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_pickup(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, err_flag: bool | None = None, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_pickup
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_quadrupole¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_quadrupole(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_quadrupole
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_rfcavity¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_rfcavity(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_rfcavity
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_sad_mult¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_sad_mult(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_sad_mult
| Parameters: |
|
|---|
track_a_sol_quad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_sol_quad(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_sol_quad
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_thick_multipole¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_thick_multipole(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, mat6: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"] | None = None, make_matrix: bool | None = None) -> None
Wrapper for Fortran routine track_a_thick_multipole
| Parameters: |
|
|---|
track_a_wiggler¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_wiggler(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, make_matrix: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"] | None
Wrapper for Fortran routine track_a_wiggler
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_a_zero_length_element¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_a_zero_length_element(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> pybmad._pybmad.TrackAZeroLengthElement
Wrapper for Fortran routine track_a_zero_length_element
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_all¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_all(lat: pybmad._pybmad.LatStruct, orbit: pybmad._pybmad.CoordStructAlloc1D, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, init_lost: bool | None = None) -> pybmad._pybmad.TrackAll
Wrapper for Fortran routine track_all
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_beam¶
Fortran source: bmad/multiparticle/beam_mod.f90
track_beam(lat: pybmad._pybmad.LatStruct, beam: pybmad._pybmad.BeamStruct, ele1: pybmad._pybmad.EleStruct | None = None, ele2: pybmad._pybmad.EleStruct | None = None, centroid: pybmad._pybmad.CoordStructArray1D | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None, bunch_tracks: pybmad._pybmad.BunchTrackStructArray1D | None = None) -> bool
Subroutine track_beam (lat, beam, ele1, ele2, err, centroid, direction, bunch_tracks)
Subroutine to track a beam of particles from the end of ele1 Through to the end of ele2. Both must be in the same lattice branch.
Note: To zero wakes between runs, zero_lr_wakes_in_lat needs to be called.
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_bunch¶
Fortran source: bmad/multiparticle/beam_mod.f90
track_bunch(lat: pybmad._pybmad.LatStruct, bunch: pybmad._pybmad.BunchStruct, ele1: pybmad._pybmad.EleStruct | None = None, ele2: pybmad._pybmad.EleStruct | None = None, centroid: pybmad._pybmad.CoordStructArray1D | None = None, direction: typing.SupportsInt | typing.SupportsIndex | None = None, bunch_track: pybmad._pybmad.BunchTrackStruct | None = None) -> bool
Subroutine track_bunch (lat, bunch, ele1, ele2, err, centroid, direction, bunch_track)
Subroutine to track a particle bunch from the end of ele1 Through to the end of ele2. Both must be in the same lattice branch. With forward tracking, if ele2 is at or before ele1, the tracking will "wrap" around the ends of the lattice.
Note: To zero wakes between runs, zero_lr_wakes_in_lat needs to be called.
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_bunch_time¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_bunch_time(bunch: pybmad._pybmad.BunchStruct, branch: pybmad._pybmad.BranchStruct, t_end: typing.SupportsFloat | typing.SupportsIndex, s_end: typing.SupportsFloat | typing.SupportsIndex, dt_step: pybmad._pybmad.RealArray1D | None = None, extra_field: pybmad._pybmad.EmFieldStructArray1D | None = None) -> None
Wrapper for Fortran routine track_bunch_time
| Parameters: |
|
|---|
track_bunch_to_s¶
Fortran source: bmad/space_charge/space_charge_mod.f90
track_bunch_to_s(bunch: pybmad._pybmad.BunchStruct, s: typing.SupportsFloat | typing.SupportsIndex, branch: pybmad._pybmad.BranchStruct) -> None
Subroutine track_bunch_to_s (bunch, s, branch)
Drift a bunch of particles to the same s coordinate
| Parameters: |
|
|---|
track_bunch_to_t¶
Fortran source: bmad/space_charge/space_charge_mod.f90
track_bunch_to_t(bunch: pybmad._pybmad.BunchStruct, t_target: typing.SupportsFloat | typing.SupportsIndex, branch: pybmad._pybmad.BranchStruct) -> None
Subroutine track_bunch_to_t (bunch, t_target, branch)
Drift a bunch of particles to the same t coordinate
| Parameters: |
|
|---|
track_complex_taylor¶
Fortran source: bmad/modules/complex_taylor_mod.f90
track_complex_taylor(start_orb: pybmad._pybmad.ComplexArray1D, complex_taylor: pybmad._pybmad.ComplexTaylorStructArray1D, end_orb: pybmad._pybmad.ComplexArray1D) -> None
Subroutine track_complex_taylor (start_orb, complex_taylor, end_orb)
Subroutine to track using a complex_taylor map.
| Parameters: |
|
|---|
track_from_s_to_s¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_from_s_to_s(lat: pybmad._pybmad.LatStruct, s_start: typing.SupportsFloat | typing.SupportsIndex, s_end: typing.SupportsFloat | typing.SupportsIndex, orbit_start: pybmad._pybmad.CoordStruct, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, ix_ele_end: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.TrackFromSToS
Wrapper for Fortran routine track_from_s_to_s
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_many¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_many(lat: pybmad._pybmad.LatStruct, orbit: pybmad._pybmad.CoordStructArray1D, ix_start: typing.SupportsInt | typing.SupportsIndex, ix_end: typing.SupportsInt | typing.SupportsIndex, direction: typing.SupportsInt | typing.SupportsIndex, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> int
Wrapper for Fortran routine track_many
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_to_surface¶
Fortran source: bmad/modules/bmad_routine_interface.f90
track_to_surface(ele: pybmad._pybmad.EleStruct, orbit: pybmad._pybmad.CoordStruct, param: pybmad._pybmad.LatParamStruct) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Wrapper for Fortran routine track_to_surface
| Parameters: |
|
|---|
| Returns: |
|
|---|
track_until_dead¶
Fortran source: bmad/modules/time_tracker_mod.f90
track_until_dead(start_orb: pybmad._pybmad.CoordStruct, lat: pybmad._pybmad.LatStruct) -> pybmad._pybmad.TrackUntilDead
subroutine track_until_dead (start_orb, lat, end_orb, track)
Subroutine to track a particle arbitrarily through a lattice, forwards or backwards, until it is lost or exits the lattice.
The starting element is located using start_orb%s.
| Parameters: |
|
|---|
| Returns: |
|
|---|
tracking_rad_map_setup¶
Fortran source: bmad/modules/bmad_routine_interface.f90
tracking_rad_map_setup(ele: pybmad._pybmad.EleStruct, tollerance: typing.SupportsFloat | typing.SupportsIndex, ref_edge: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.TrackingRadMapSetup
Wrapper for Fortran routine tracking_rad_map_setup
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_ac_kick¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_ac_kick(ac_in: pybmad._pybmad.AcKickerStruct) -> pybmad._pybmad.AcKickerStruct | None
Wrapper for Fortran routine transfer_ac_kick
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_branch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_branch(branch1: pybmad._pybmad.BranchStruct) -> pybmad._pybmad.BranchStruct
Wrapper for Fortran routine transfer_branch
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_branch_parameters¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_branch_parameters(branch_in: pybmad._pybmad.BranchStruct) -> pybmad._pybmad.BranchStruct
Wrapper for Fortran routine transfer_branch_parameters
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_branches¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_branches(branch1: pybmad._pybmad.BranchStructArray1D, branch2: pybmad._pybmad.BranchStructArray1D) -> None
Wrapper for Fortran routine transfer_branches
| Parameters: |
|
|---|
transfer_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_ele(ele1: pybmad._pybmad.EleStruct, nullify_pointers: bool | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine transfer_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_ele_taylor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_ele_taylor(ele_in: pybmad._pybmad.EleStruct, taylor_order: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine transfer_ele_taylor
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_eles¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_eles(ele1: pybmad._pybmad.EleStructArray1D, ele2: pybmad._pybmad.EleStructArray1D) -> None
Wrapper for Fortran routine transfer_eles
| Parameters: |
|
|---|
transfer_fieldmap¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_fieldmap(ele_in: pybmad._pybmad.EleStruct, who: typing.SupportsInt | typing.SupportsIndex) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine transfer_fieldmap
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_fixer_params¶
Fortran source: bmad/modules/fixer_mod.f90
transfer_fixer_params(fixer: pybmad._pybmad.EleStruct, to_stored: bool, orbit: pybmad._pybmad.CoordStruct | None = None, who: str | None = None) -> bool
Function transfer_fixer_params(fixer, to_stored, orbit, who) result (is_ok)
Set parameters of fixer.
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_lat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_lat_parameters¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_map_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_map_calc(lat: pybmad._pybmad.LatStruct, orb_map: pybmad._pybmad.TaylorStructArray1D, ix1: typing.SupportsInt | typing.SupportsIndex | None = None, ix2: typing.SupportsInt | typing.SupportsIndex | None = None, ref_orb: pybmad._pybmad.CoordStruct | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, one_turn: bool | None = None, unit_start: bool | None = None, concat_if_possible: bool | None = None, spin_map: pybmad._pybmad.TaylorStructArray1D | None = None) -> bool
Wrapper for Fortran routine transfer_map_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_map_from_s_to_s¶
Fortran source: bmad/modules/transfer_map_mod.f90
transfer_map_from_s_to_s(lat: pybmad._pybmad.LatStruct, t_map: pybmad._pybmad.TaylorStructArray1D, s1: typing.SupportsFloat | typing.SupportsIndex | None = None, s2: typing.SupportsFloat | typing.SupportsIndex | None = None, ref_orb_in: pybmad._pybmad.CoordStruct | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, one_turn: bool | None = None, unit_start: bool | None = None, concat_if_possible: bool | None = None, spin_map: pybmad._pybmad.TaylorStructArray1D | None = None) -> pybmad._pybmad.TransferMapFromSToS
Subroutine transfer_map_from_s_to_s (lat, t_map, s1, s2, ref_orb_in, ref_orb_out, ix_branch, one_turn, unit_start, err_flag, concat_if_possible, spin_map)
Subroutine to calculate the transfer map between longitudinal positions s1 to s2.
If s2 < s1 and lat%param%geometry is closed$ then the calculation will 'wrap around' the lattice end. For example, if s1 = 900 and s2 = 10 then the t_map is the map from element 900 to the lattice end plus from 0 through 10.
If s2 < s1 and lat%param%geometry is open$ then the inverse of the forward map of s2 -> s1 is computed.
If s2 = s1 then you get the unit map except if one_turn = True and the lattice is circular.
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_mat2_from_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_mat2_from_twiss(twiss1: pybmad._pybmad.TwissStruct, twiss2: pybmad._pybmad.TwissStruct) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(2)"]], "FixedSize(2)"]
Wrapper for Fortran routine transfer_mat2_from_twiss
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_mat_from_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_mat_from_twiss(ele1: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct, orb1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"], orb2: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(6)"]], "FixedSize(6)"]
Wrapper for Fortran routine transfer_mat_from_twiss
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_matrix_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_matrix_calc(lat: pybmad._pybmad.LatStruct, xfer_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"]], "FixedSize(6)"], xfer_vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(6)"] | None = None, ix1: typing.SupportsInt | typing.SupportsIndex | None = None, ix2: typing.SupportsInt | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, one_turn: bool | None = None) -> None
Wrapper for Fortran routine transfer_matrix_calc
| Parameters: |
|
|---|
transfer_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_twiss(ele_in: pybmad._pybmad.EleStruct, reverse: bool | None = None) -> pybmad._pybmad.EleStruct
Wrapper for Fortran routine transfer_twiss
| Parameters: |
|
|---|
| Returns: |
|
|---|
transfer_wake¶
Fortran source: bmad/modules/bmad_routine_interface.f90
transfer_wake(wake_in: pybmad._pybmad.WakeStruct) -> pybmad._pybmad.WakeStruct | None
Wrapper for Fortran routine transfer_wake
| Parameters: |
|
|---|
| Returns: |
|
|---|
truncate_complex_taylor_to_order¶
Fortran source: bmad/modules/complex_taylor_mod.f90
truncate_complex_taylor_to_order(complex_taylor_in: pybmad._pybmad.ComplexTaylorStructArray1D, order: typing.SupportsInt | typing.SupportsIndex, complex_taylor_out: pybmad._pybmad.ComplexTaylorStructArray1D) -> None
Subroutine truncate_complex_taylor_to_order (complex_taylor_in, order, complex_taylor_out)
Subroutine to throw out all terms in a complex_taylor map that are above a certain order.
| Parameters: |
|
|---|
twiss1_propagate¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss1_propagate(twiss1: pybmad._pybmad.TwissStruct, mat2: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]], "FixedSize(2)"], ele_key: typing.SupportsInt | typing.SupportsIndex, length: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Twiss1Propagate
Wrapper for Fortran routine twiss1_propagate
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss3_at_start¶
Fortran source: bmad/modules/mode3_mod.f90
twiss3_at_start(lat: pybmad._pybmad.LatStruct, err_flag: bool, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> typing.Annotated[list[float], "FixedSize(3)"]
Subroutine twiss3_at_start (lat, error, ix_branch, tune3)
Subroutine to calculate the 3D twiss parameters of the three modes of the full 6D 1-turn transfer matrix. This routine is for lattices with closed geometries. For open lattices see: twiss3_from_twiss2.
Note: The rf must be on for this calculation.
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss3_from_twiss2¶
Fortran source: bmad/modules/mode3_mod.f90
twiss3_from_twiss2(ele: pybmad._pybmad.EleStruct) -> None
Subroutine twiss3_from_twiss2 (ele)
Routine to calculate the 3D Twiss parameters given the 2D transverse Twiss parameters and some longitudinal parameters. Also see: twiss3_at_start
| Parameters: |
|
|---|
twiss3_propagate1¶
Fortran source: bmad/modules/mode3_mod.f90
twiss3_propagate1(ele1: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct, err_flag: bool) -> None
Subroutine twiss3_propagate1 (ele1, ele2, err_flag)
Subroutine to propagate the twiss parameters using all three normal modes. Subroutine from original mode3_mod.
twiss3_propagate_all¶
Fortran source: bmad/modules/mode3_mod.f90
twiss3_propagate_all(lat: pybmad._pybmad.LatStruct, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Subroutine twiss3_propagate_all (lat, ix_branch)
Subroutine to propagate the twiss parameters using all three normal modes. Subroutine from original mode3_mod.
| Parameters: |
|
|---|
twiss_and_track¶
Fortran sources (overloaded):
twiss_and_track_branch:bmad/modules/twiss_and_track_mod.f90twiss_and_track_all:bmad/modules/twiss_and_track_mod.f90
twiss_and_track(args, *kwargs) Overloaded function.
- twiss_and_track(lat: pybmad._pybmad.LatStruct, orb_array: pybmad._pybmad.CoordArrayStructAlloc1D, print_err: bool | None = None, calc_chrom: bool | None = None, use_particle_start: bool | None = None) -> int
Subroutine twiss_and_track
This routine is an overloaded name for: Subroutine twiss_and_track_branch (lat, orb, status, ix_branch, print_err, calc_chrom, orb_start, use_particle_start) Subroutine twiss_and_track_all (lat, orb_array, status, print_err, calc_chrom, use_particle_start)
Routine to calculate the twiss parameters, transport matrices and orbit.
The essential difference between these two procedures is that twiss_and_track_branch only does the main branch while twiss_and_track_all does everything but the photon_fork elements.
Note: This is not necessarily the fastest way to do things since this routine does the entire calculation from scratch.
For a circular ring: If the RF is on, the computed orbit will be the 6D closed orbit. If the RF is off, the 4D transverse closed orbit using orbi(0)%vec(6) is computed.
For an open lattice, the orbit will be computed using orb(0) as starting conditions.
If there is a problem the status argument settings are: in_stop_band\(, unstable\), non_symplectic\(, in_stop_band\), non_symplectic\(, xfer_mat_clac_failure\), twiss_propagate_failure\(, no_complete_orbit\), or no_closed_orbit\(. Note: in_stop_band\), unstable\(, and non_symplectic\) refer to the 1-turn matrix which is computed with closed lattices. For an open geometry branch, status = no_complete_orbit$ is for where the particle is lost in tracking. A negative sign is used to differentiate an error occuring in the first call to twiss_at_start from the second call to twiss_at_start.
If there is a problem in an open geometry branch, status argument setting is -N where N is the element where the particle was lost in tracking (negative numbers are used here to avoid confusion with ok$ which is mapped to 1.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_and_track_at_s¶
Fortran source: bmad/modules/twiss_and_track_mod.f90
twiss_and_track_at_s(lat: pybmad._pybmad.LatStruct, s: typing.SupportsFloat | typing.SupportsIndex, ele_at_s: pybmad._pybmad.EleStruct | None = None, orb: pybmad._pybmad.CoordStructArray1D | None = None, orb_at_s: pybmad._pybmad.CoordStruct | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, use_last: bool | None = None, compute_floor_coords: bool | None = None) -> bool
Subroutine twiss_and_track_at_s (lat, s, ele_at_s, orb, orb_at_s, ix_branch, err, use_last, compute_floor_coords)
Subroutine to return the twiss parameters and particle orbit at a given longitudinal position.
When calculating the Twiss parameters, this routine assumes that the lattice elements already contain the Twiss parameters calculated for the ends of the elements.
Additionally, the orbit at the ends of the elements (contained in orb(:)) must be precomputed when orb_at_s is present.
Precomputation of Twiss and orbit at the element ends may be done with the twiss_and_track routine.
See also: twiss_and_track_from_s_to_s twiss_and_track_intra_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_and_track_from_s_to_s¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_and_track_from_s_to_s(branch: pybmad._pybmad.BranchStruct, orbit_start: pybmad._pybmad.CoordStruct, s_end: typing.SupportsFloat | typing.SupportsIndex, ele_start: pybmad._pybmad.EleStruct | None = None, compute_floor_coords: bool | None = None, compute_twiss: bool | None = None) -> pybmad._pybmad.TwissAndTrackFromSToS
Wrapper for Fortran routine twiss_and_track_from_s_to_s
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_and_track_intra_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_and_track_intra_ele(ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct, l_start: typing.SupportsFloat | typing.SupportsIndex, l_end: typing.SupportsFloat | typing.SupportsIndex, track_upstream_end: bool, track_downstream_end: bool, orbit_start: pybmad._pybmad.CoordStruct | None = None, ele_start: pybmad._pybmad.EleStruct | None = None, ele_end: pybmad._pybmad.EleStruct | None = None, compute_floor_coords: bool | None = None, compute_twiss: bool | None = None, reuse_ele_end: bool | None = None) -> pybmad._pybmad.TwissAndTrackIntraEle
Wrapper for Fortran routine twiss_and_track_intra_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_at_element¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_at_element(ele: pybmad._pybmad.EleStruct) -> pybmad._pybmad.TwissAtElement
Wrapper for Fortran routine twiss_at_element
| Parameters: |
|
|---|
| Returns: |
|---|
twiss_at_start¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_at_start(lat: pybmad._pybmad.LatStruct, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, type_out: bool | None = None) -> int
Wrapper for Fortran routine twiss_at_start
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_from_tracking¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_from_tracking(lat: pybmad._pybmad.LatStruct, ref_orb0: pybmad._pybmad.CoordStruct, d_orb: pybmad._pybmad.RealArray1D | None = None) -> pybmad._pybmad.TwissFromTracking
Wrapper for Fortran routine twiss_from_tracking
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_propagate1¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_propagate1(ele1: pybmad._pybmad.EleStruct, ele2: pybmad._pybmad.EleStruct, forward: bool | None = None) -> bool
Wrapper for Fortran routine twiss_propagate1
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_propagate_all¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_propagate_all(lat: pybmad._pybmad.LatStruct, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, ie_start: typing.SupportsInt | typing.SupportsIndex | None = None, ie_end: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine twiss_propagate_all
| Parameters: |
|
|---|
| Returns: |
|
|---|
twiss_to_1_turn_mat¶
Fortran source: bmad/modules/bmad_routine_interface.f90
twiss_to_1_turn_mat(twiss: pybmad._pybmad.TwissStruct, phi: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(2)"]], "FixedSize(2)"]
Wrapper for Fortran routine twiss_to_1_turn_mat
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_complex_taylors¶
Fortran source: bmad/modules/complex_taylor_mod.f90
type_complex_taylors(complex_taylor: pybmad._pybmad.ComplexTaylorStructArray1D, max_order: typing.SupportsInt | typing.SupportsIndex | None = None, file_id: typing.SupportsInt | typing.SupportsIndex | None = None, out_type: str | None = None, clean: bool | None = None) -> pybmad._pybmad.TypeComplexTaylors
Subroutine type_complex_taylors (complex_taylor, max_order, lines, n_lines, file_id, out_type, clean)
Subroutine to print or put in a string array a Bmad taylor map. If the lines(:) argument is not present, the element information is printed to the terminal.
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_coord¶
Fortran source: bmad/modules/bmad_routine_interface.f90
type_coord(coord: pybmad._pybmad.CoordStruct) -> None
Wrapper for Fortran routine type_coord
| Parameters: |
|
|---|
type_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
type_ele(ele: pybmad._pybmad.EleStruct, type_zero_attrib: bool | None = None, type_mat6: typing.SupportsInt | typing.SupportsIndex | None = None, type_taylor: bool | None = None, twiss_out: typing.SupportsInt | typing.SupportsIndex | None = None, type_control: typing.SupportsInt | typing.SupportsIndex | None = None, type_wake: bool | None = None, type_floor_coords: bool | None = None, type_field: typing.SupportsInt | typing.SupportsIndex | None = None, type_wall: bool | None = None, type_rad_kick: bool | None = None, type_internal: bool | None = None) -> pybmad._pybmad.TypeEle
Wrapper for Fortran routine type_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_end_stuff¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
type_end_stuff(li: pybmad._pybmad.CharacterAlloc1D, nl: typing.SupportsInt | typing.SupportsIndex, lines: pybmad._pybmad.CharacterAlloc1D | None = None, n_lines: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine type_end_stuff
| Parameters: |
|
|---|
type_expression_tree¶
Fortran source: bmad/modules/expression_mod.f90
type_expression_tree(tree: pybmad._pybmad.ExpressionTreeStruct, indent: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Subroutine type_expression_tree (tree, indent)
Routine to print an expression tree in tree form. Good for debugging.
| Parameters: |
|
|---|
type_ptc_fibre¶
Fortran source: bmad/ptc/ptc_interface_mod.f90
type_ptc_fibre(ptc_fibre: pybmad._pybmad.Fibre, print_coords: bool | None = None) -> pybmad._pybmad.TypePtcFibre
Subroutine type_ptc_fibre (ptc_fibre, print_coords, lines, n_lines)
Routine to put information on a PTC fibre element into a string array. If "lines" is not present, the information will be printed to the screen.
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_ptc_layout¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
type_ptc_layout(lay: pybmad._pybmad.Layout) -> None
Subroutine type_ptc_layout (lay)
Subroutine to print the global information in a layout
type_taylors¶
Fortran source: bmad/modules/bmad_routine_interface.f90
type_taylors(bmad_taylor: pybmad._pybmad.TaylorStructArray1D, max_order: typing.SupportsInt | typing.SupportsIndex | None = None, lines: pybmad._pybmad.CharacterAlloc1D | None = None, n_lines: typing.SupportsInt | typing.SupportsIndex | None = None, file_id: typing.SupportsInt | typing.SupportsIndex | None = None, out_style: str | None = None, clean: bool | None = None, out_var_suffix: str | None = None, append: bool | None = None) -> pybmad._pybmad.TypeTaylors
Wrapper for Fortran routine type_taylors
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_twiss¶
Fortran source: bmad/modules/bmad_routine_interface.f90
type_twiss(ele: pybmad._pybmad.EleStruct, frequency_units: typing.SupportsInt | typing.SupportsIndex | None = None, compact_format: bool | None = None, lines: pybmad._pybmad.CharacterAlloc1D | None = None) -> int
Wrapper for Fortran routine type_twiss
| Parameters: |
|
|---|
| Returns: |
|
|---|
update_ele_from_fibre¶
Fortran source: bmad/ptc/ptc_layout_mod.f90
update_ele_from_fibre(ele: pybmad._pybmad.EleStruct) -> None
Subroutine update_ele_from_fibre (ele)
Routine to update a bmad lattice element when the associated PTC fibre has been modified. Remember to call lattice_bookkeeper after calling this routine.
| Parameters: |
|
|---|
update_fibre_from_ele¶
Fortran source: bmad/modules/bmad_routine_interface.f90
update_fibre_from_ele(ele: pybmad._pybmad.EleStruct) -> bool
Wrapper for Fortran routine update_fibre_from_ele
| Parameters: |
|
|---|
| Returns: |
|
|---|
update_floor_angles¶
Fortran source: bmad/modules/bmad_routine_interface.f90
update_floor_angles(floor: pybmad._pybmad.FloorPositionStruct, floor0: pybmad._pybmad.FloorPositionStruct | None = None) -> None
Wrapper for Fortran routine update_floor_angles
| Parameters: |
|
|---|
valid_field_calc¶
Fortran source: bmad/modules/bmad_routine_interface.f90
valid_field_calc(ele: pybmad._pybmad.EleStruct, field_calc: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine valid_field_calc
| Parameters: |
|
|---|
| Returns: |
|
|---|
valid_fringe_type¶
Fortran source: bmad/modules/bmad_routine_interface.f90
valid_fringe_type(ele: pybmad._pybmad.EleStruct, fringe_type: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine valid_fringe_type
| Parameters: |
|
|---|
| Returns: |
|
|---|
valid_mat6_calc_method¶
Fortran source: bmad/modules/bmad_routine_interface.f90
valid_mat6_calc_method(ele: pybmad._pybmad.EleStruct, species: typing.SupportsInt | typing.SupportsIndex, mat6_calc_method: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine valid_mat6_calc_method
| Parameters: |
|
|---|
| Returns: |
|
|---|
valid_spin_tracking_method¶
Fortran source: bmad/modules/bmad_routine_interface.f90
valid_spin_tracking_method(ele: pybmad._pybmad.EleStruct, spin_tracking_method: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine valid_spin_tracking_method
| Parameters: |
|
|---|
| Returns: |
|
|---|
valid_tracking_method¶
Fortran source: bmad/modules/bmad_routine_interface.f90
valid_tracking_method(ele: pybmad._pybmad.EleStruct, species: typing.SupportsInt | typing.SupportsIndex, tracking_method: typing.SupportsInt | typing.SupportsIndex) -> bool
Wrapper for Fortran routine valid_tracking_method
| Parameters: |
|
|---|
| Returns: |
|
|---|
value_of_attribute¶
Fortran source: bmad/modules/bmad_routine_interface.f90
value_of_attribute(ele: pybmad._pybmad.EleStruct, attrib_name: str, err_print_flag: bool | None = None, err_value: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.ValueOfAttribute
Wrapper for Fortran routine value_of_attribute
| Parameters: |
|
|---|
| Returns: |
|
|---|
value_to_line¶
Fortran source: bmad/output/write_lattice_file_mod.f90
value_to_line(line: str, value: typing.SupportsFloat | typing.SupportsIndex, str: str, typ: str, ignore_if_zero: bool | None = None, use_comma: bool | None = None) -> None
Wrapper for Fortran routine value_to_line
| Parameters: |
|
|---|
vec_to_polar¶
Fortran source: bmad/modules/bmad_routine_interface.f90
vec_to_polar(vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], phase: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.SpinPolarStruct
Wrapper for Fortran routine vec_to_polar
| Parameters: |
|
|---|
| Returns: |
|
|---|
vec_to_spinor¶
Fortran source: bmad/modules/bmad_routine_interface.f90
vec_to_spinor(vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], phase: typing.SupportsFloat | typing.SupportsIndex | None = None) -> typing.Annotated[list[complex], "FixedSize(2)"]
Wrapper for Fortran routine vec_to_spinor
| Parameters: |
|
|---|
| Returns: |
|
|---|
verify_valid_name¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
verify_valid_name(name: str, ix_name: typing.SupportsInt | typing.SupportsIndex, pure_name: bool | None = None, include_wild: bool | None = None) -> bool
Function verify_valid_name (name, ix_name, pure_name, include_wild) result (is_valid)
Routine to check if a name is well formed. Examples: "0>>Q0" -- Invalid (will only be valid after lattice expansion). "Q1##1" -- Invalid (double hash not accepted). "Q2A_C.\7#" -- Pure name (no "[", "]", "(", ")", "%" characters present). "Q3[GRID_FIELD(1)%FIELD_SCALE]" -- Valid but not a pure name. "RFCAVITY::*" -- Valid if include_wild = True.
This subroutine is used by bmad_parser and bmad_parser2. This subroutine is not intended for general use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
w_mat_for_bend_angle¶
Fortran source: bmad/modules/bmad_routine_interface.f90
w_mat_for_bend_angle(angle: typing.SupportsFloat | typing.SupportsIndex, ref_tilt: typing.SupportsFloat | typing.SupportsIndex, r_vec: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"] | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Wrapper for Fortran routine w_mat_for_bend_angle
| Parameters: |
|
|---|
| Returns: |
|
|---|
w_mat_for_tilt¶
Fortran source: bmad/modules/bmad_routine_interface.f90
w_mat_for_tilt(tilt: typing.SupportsFloat | typing.SupportsIndex, return_inverse: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Wrapper for Fortran routine w_mat_for_tilt
| Parameters: |
|
|---|
| Returns: |
|
|---|
w_mat_for_x_pitch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
w_mat_for_x_pitch(x_pitch: typing.SupportsFloat | typing.SupportsIndex, return_inverse: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Wrapper for Fortran routine w_mat_for_x_pitch
| Parameters: |
|
|---|
| Returns: |
|
|---|
w_mat_for_y_pitch¶
Fortran source: bmad/modules/bmad_routine_interface.f90
w_mat_for_y_pitch(y_pitch: typing.SupportsFloat | typing.SupportsIndex, return_inverse: bool | None = None) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Wrapper for Fortran routine w_mat_for_y_pitch
| Parameters: |
|
|---|
| Returns: |
|
|---|
wall3d_d_radius¶
Fortran source: bmad/modules/wall3d_mod.f90
wall3d_d_radius(position: pybmad._pybmad.RealArray1D, ele: pybmad._pybmad.EleStruct, ix_wall: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.Wall3dDRadius
Function wall3d_d_radius (position, ele, ix_wall, perp, ix_section, no_wall_here, origin, radius_wall, err_flag) result (d_radius)
Routine to calculate the difference radius = particle_radius - wall_radius. Radiuses are measured along a line from the wall origin with the line passing through the particle position. The wall origin itself lies on a line connecting the centers of the bounding sections.
Module needed: use wall3d_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
wall3d_initializer¶
Fortran source: bmad/modules/wall3d_mod.f90
wall3d_initializer(wall3d: pybmad._pybmad.Wall3DStruct) -> bool
Subroutine wall3d_initializer (wall3d, err)
Routine to initialize a wall3d_struct 1) Add vertex points if there is symmetry. 2) Compute circular and elliptical centers. 3) Compute spline coefficients, etc.
| Parameters: |
|
|---|
| Returns: |
|
|---|
wall3d_section_initializer¶
Fortran source: bmad/modules/wall3d_mod.f90
wall3d_section_initializer(section: pybmad._pybmad.Wall3DSectionStruct) -> bool
Subroutine wall3d_section_initializer (section, err)
Routine to initialize a wall3d_section_struct: 1) Add vertex points if there is symmetry. 2) Compute circular and elliptical centers.
| Parameters: |
|
|---|
| Returns: |
|
|---|
wall3d_to_position¶
Fortran source: bmad/modules/wall3d_mod.f90
wall3d_to_position(orbit: pybmad._pybmad.CoordStruct, ele: pybmad._pybmad.EleStruct) -> typing.Annotated[list[float], "FixedSize(6)"]
Function wall3d_to_position (orbit, ele) result (position)
Routine to return the suitable postion to be used in calling wall3d_d_radius
This routine assumes that if in a patch the coordinates of orbit are with respect to the downstream end if orbit%direction*orbit%time_dir = 1 and vice versa.
| Parameters: |
|
|---|
| Returns: |
|
|---|
word_to_value¶
Fortran source: bmad/parsing/bmad_parser_mod.f90
word_to_value(word: str, lat: pybmad._pybmad.LatStruct, value: typing.SupportsFloat | typing.SupportsIndex, err_flag: bool, ele: pybmad._pybmad.EleStruct | None = None) -> None
Wrapper for Fortran routine word_to_value
| Parameters: |
|---|
write_ascii_beam_file¶
Fortran source: bmad/multiparticle/beam_file_io.f90
write_ascii_beam_file(file_name: str, beam: pybmad._pybmad.BeamStruct, new_file: bool | None = None, alive_only: bool | None = None) -> None
Subroutine write_ascii_beam_file (file_name, beam, new_file, alive_only)
Routine to write a beam file in ASCII format (version 4).
| Parameters: |
|
|---|
write_astra_bend¶
Fortran source: bmad/interface/astra_interface_mod.f90
write_astra_bend(iu: typing.SupportsInt | typing.SupportsIndex, strength: typing.SupportsFloat | typing.SupportsIndex, id: typing.SupportsInt | typing.SupportsIndex, d1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], d2: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], d3: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], d4: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]) -> None
Wrapper for Fortran routine write_astra_bend
| Parameters: |
|
|---|
write_astra_field_grid_file¶
Fortran source: bmad/interface/astra_interface_mod.f90
write_astra_field_grid_file(astra_file_unit: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, dz: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.WriteAstraFieldGridFile
Subroutine write_astra_field_grid_file (astra_file_unit, ele, maxfield, err)
Write 1-D field map files for Astra. The format is: z field ...
Note: Simplified from write_opal_field_grid_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_astra_field_grid_file_3d¶
Fortran source: bmad/interface/astra_interface_mod.f90
write_astra_field_grid_file_3d(base_filename: str, ele: pybmad._pybmad.EleStruct, dz: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.WriteAstraFieldGridFile3d
Subroutine write_astra_field_grid_file_3D (base_filename, ele, maxfield, dz, err)
Writes 3-D field map files for Astra. The format is:
Nx x[1] x[2] ....... x[Nx-1] x[Nx]
Ny y[1] y[2] ....... y[Ny-1] y[Ny]
Nz z[1] z[2] ....... z[Nz-1] z[Nz]
Note: similar to write_astra_field_grid_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_beam_file¶
Fortran source: bmad/multiparticle/beam_file_io.f90
write_beam_file(file_name: str, beam: pybmad._pybmad.BeamStruct, new_file: bool | None = None, file_format: typing.SupportsInt | typing.SupportsIndex | None = None, lat: pybmad._pybmad.LatStruct | None = None, alive_only: bool | None = None) -> None
Subroutine write_beam_file (file_name, beam, new_file, file_format, lat, alive_only)
Routine to write a beam file.
A '.h5' suffix will be appended to the created file if hdf5$ format is used and file_name does not already have a '.h5' or '.hdf5' suffix.
| Parameters: |
|
|---|
write_beam_floor_positions¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_beam_floor_positions(file_name: str, beam: pybmad._pybmad.BeamStruct, ele: pybmad._pybmad.EleStruct, new_file: bool | None = None) -> None
Wrapper for Fortran routine write_beam_floor_positions
| Parameters: |
|
|---|
write_binary_cartesian_map¶
Fortran source: bmad/parsing/binary_parser_mod.f90
write_binary_cartesian_map(file_name: str, ele: pybmad._pybmad.EleStruct, cart_map: pybmad._pybmad.CartesianMapStruct) -> bool
Subroutine write_binary_cartesian_map (file_name, ele, cart_map, err_flag)
Routine to write a binary cartesian_map structure. Note: The file name should have a ".bin" suffix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_binary_cylindrical_map¶
Fortran source: bmad/parsing/binary_parser_mod.f90
write_binary_cylindrical_map(file_name: str, ele: pybmad._pybmad.EleStruct, cl_map: pybmad._pybmad.CylindricalMapStruct) -> bool
Subroutine write_binary_cylindrical_map (file_name, ele, cl_map, err_flag)
Routine to write a binary cylindrical_map structure. Note: The file name should have a ".bin" suffix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_binary_grid_field¶
Fortran source: bmad/parsing/binary_parser_mod.f90
write_binary_grid_field(file_name: str, ele: pybmad._pybmad.EleStruct, g_field: pybmad._pybmad.GridFieldStruct) -> bool
Subroutine write_binary_grid_field (file_name, ele, g_field, err_flag)
Routine to write a binary grid_field structure. Note: The file name should have a ".bin" suffix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_blender_ele¶
Fortran source: bmad/interface/blender_interface_mod.f90
write_blender_ele(iu: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, old_format: bool | None = None) -> None
Wrapper for Fortran routine write_blender_ele
| Parameters: |
|
|---|
write_blender_lat_layout¶
Fortran source: bmad/interface/blender_interface_mod.f90
write_blender_lat_layout(file_name: str, lat: pybmad._pybmad.LatStruct) -> None
Wrapper for Fortran routine write_blender_lat_layout
| Parameters: |
|
|---|
write_bmad_lattice_file¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_bmad_lattice_file(bmad_file: str, lat: pybmad._pybmad.LatStruct, output_form: typing.SupportsInt | typing.SupportsIndex | None = None, orbit0: pybmad._pybmad.CoordStruct | None = None) -> bool
Wrapper for Fortran routine write_bmad_lattice_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_gpt_field_grid_file_1d¶
Fortran source: bmad/interface/gpt_interface_mod.f90
write_gpt_field_grid_file_1d(gpt_file_unit: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, dz: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.WriteGptFieldGridFile1d
Subroutine write_gpt_field_grid_file_1D (gpt_file_unit, ele, maxfield, ref_time, dz, err)
Write 1-D field map files for gpt. The format is: z field ...
Note: Simplified from write_opal_field_grid_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_gpt_field_grid_file_2d¶
Fortran source: bmad/interface/gpt_interface_mod.f90
write_gpt_field_grid_file_2d(gpt_file_unit: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, dr: typing.SupportsFloat | typing.SupportsIndex | None = None, dz: typing.SupportsFloat | typing.SupportsIndex | None = None, r_max: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.WriteGptFieldGridFile2d
Subroutine write_gpt_field_grid_file_2D (gpt_file_unit, ele, maxfield, ref_time, dr, dz, err)
Subroutine to write an GPT lattice file using the information in a lat_struct. Optionally only part of the lattice can be generated.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_gpt_field_grid_file_3d¶
Fortran source: bmad/interface/gpt_interface_mod.f90
write_gpt_field_grid_file_3d(base_filename: str, ele: pybmad._pybmad.EleStruct, dz: typing.SupportsFloat | typing.SupportsIndex | None = None) -> pybmad._pybmad.WriteGptFieldGridFile3d
Subroutine write_gpt_field_grid_file_3D (base_filename, ele, maxfield, ref_time, dz, err)
Writes 3-D field map files for gpt. The format is:
E-fields: 'x', 'y', 'z', 'ExRe', 'EyRe', 'EzRe', 'ExIm ', 'EyIm ', 'EzIm ' H-fields 'x', 'y', 'z', 'HxRe', 'HyRe', 'HzRe', 'HxIm ', 'HyIm ', 'HzIm '
where the fields oscillate as exp(+i \omega t)
Note: similar to write_gpt_field_grid_file
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lat_line¶
Fortran source: bmad/output/write_lattice_file_mod.f90
write_lat_line(line: str, iu: typing.SupportsInt | typing.SupportsIndex, end_is_neigh: bool, do_split: bool | None = None, ampersand_at_ends: bool | None = None) -> pybmad._pybmad.WriteLatLine
Subroutine write_lat_line (line, iu, end_is_neigh, do_split, ampersand_at_ends)
Routine to write strings to a lattice file. This routine will break the string up into multiple lines if the string is too long and add a continuation character if needed.
If the "line" arg does not represent a full "sentence" (end_is_neigh = False), then only part of the line may be written and the part not written will be returned.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lattice_in_elegant_format¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_elegant_format(out_file_name: str, lat: pybmad._pybmad.LatStruct, ref_orbit: pybmad._pybmad.CoordStructAlloc1D | None = None, use_matrix_model: bool | None = None, include_apertures: bool | None = None, dr12_drift_max: typing.SupportsFloat | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine write_lattice_in_elegant_format
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lattice_in_foreign_format¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_foreign_format(out_type: str, out_file_name: str, lat: pybmad._pybmad.LatStruct, ref_orbit: pybmad._pybmad.CoordStructAlloc1D | None = None, use_matrix_model: bool | None = None, include_apertures: bool | None = None, dr12_drift_max: typing.SupportsFloat | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine write_lattice_in_foreign_format
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lattice_in_mad_format¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_mad_format(out_type: str, out_file_name: str, lat: pybmad._pybmad.LatStruct, ref_orbit: pybmad._pybmad.CoordStructAlloc1D | None = None, use_matrix_model: bool | None = None, include_apertures: bool | None = None, dr12_drift_max: typing.SupportsFloat | typing.SupportsIndex | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None) -> bool
Wrapper for Fortran routine write_lattice_in_mad_format
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lattice_in_pals¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_pals(lat: pybmad._pybmad.LatStruct) -> pybmad._pybmad.WriteLatticeInPals
Wrapper for Fortran routine write_lattice_in_pals
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_lattice_in_sad_format¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_sad_format(out_file_name: str, lat: pybmad._pybmad.LatStruct, include_apertures: bool | None = None, ix_branch: typing.SupportsInt | typing.SupportsIndex | None = None, err: bool | None = None) -> None
Wrapper for Fortran routine write_lattice_in_sad_format
| Parameters: |
|
|---|
write_lattice_in_scibmad¶
Fortran source: bmad/modules/bmad_routine_interface.f90
write_lattice_in_scibmad(lat: pybmad._pybmad.LatStruct) -> pybmad._pybmad.WriteLatticeInScibmad
Wrapper for Fortran routine write_lattice_in_scibmad
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_line_element¶
Fortran source: bmad/output/write_lattice_file_mod.f90
write_opal_field_grid_file¶
Fortran source: bmad/interface/opal_interface_mod.f90
write_opal_field_grid_file(opal_file_unit: typing.SupportsInt | typing.SupportsIndex, ele: pybmad._pybmad.EleStruct, param: pybmad._pybmad.LatParamStruct) -> pybmad._pybmad.WriteOpalFieldGridFile
Subroutine write_opal_field_grid_file (opal_file_unit, ele, param, maxfield, err)
Subroutine to write an OPAL lattice file using the information in a lat_struct. Optionally only part of the lattice can be generated.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_opal_lattice_file¶
Fortran source: bmad/interface/opal_interface_mod.f90
write_opal_lattice_file(opal_file_unit: typing.SupportsInt | typing.SupportsIndex, lat: pybmad._pybmad.LatStruct) -> bool
Subroutine write_opal_lattice_file (opal_file_unit, lat, err)
Subroutine to write an OPAL lattice file using the information in a lat_struct. Optionally only part of the lattice can be generated.
| Parameters: |
|
|---|
| Returns: |
|
|---|
write_time_particle_distribution¶
Fortran source: bmad/modules/time_tracker_mod.f90
write_time_particle_distribution(time_file_unit: typing.SupportsInt | typing.SupportsIndex, bunch: pybmad._pybmad.BunchStruct, ele: pybmad._pybmad.EleStruct, style: str | None = None, branch: pybmad._pybmad.BranchStruct | None = None, format: str | None = None) -> bool
Subroutine write_time_particle_distribution (time_file_unit, bunch, ele, style, branch, format, err)
Subroutine to write a time-based bunch from a standard Bmad bunch
Note: 'BMAD' style (absolute curvilinear coordinates): n_particles_alive x/m mc^2 \beta_x\gamma/eV y/m mc^2\beta_y\gamma/eV s/m mc^2\beta_z\gamma/eV time/s charge/C
'OPAL' style (absolute curvilinear coordinates):
n_particles_alive
x/m \beta_x*\gamma y/m \beta_y*\gamma s/m \beta_s*\gamma
'ASTRA' style (global Cartesian coordinates, first line is the reference particle used for z, pz, and t calculation):
x/m y/m z/m m*c^2 \beta_x*\gamma/eV m*c^2 \beta_y*\gamma/eV m*c^2 \beta_z*\gamma/eV time/ns charge/nC species status
'GPT' style (global Cartesian coordinates, with header labeling the columns)
x/m y/m z/m \beta_x*\gamma \beta_y*\gamma \beta_z*\gamma t/s elementary_charge/C charge/elementary_charge
| Parameters: |
|
|---|
| Returns: |
|
|---|
xlafun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
xlafun(x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine xlafun
| Parameters: |
|
|---|
xraylib_nist_compound¶
Fortran source: bmad/interface/xraylib_interface.f90
xraylib_nist_compound(name: str) -> int
Function xraylib_nist_compound (name) result (indx)
Routine to return the xraylib index for a given NIST compound. Taken from file xraylib/include/xraylib-nist_compounds.h
| Parameters: |
|
|---|
| Returns: |
|
|---|
ylafun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
ylafun(x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine ylafun
| Parameters: |
|
|---|
z_at_surface¶
Fortran source: bmad/photon/photon_utils_mod.f90
z_at_surface(ele: pybmad._pybmad.EleStruct, x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, extend_grid: bool | None = None) -> pybmad._pybmad.ZAtSurface
Function z_at_surface (ele, x, y, err_flag, extend_grid, dz_dxy) result (z)
Routine return the height (z) of the surface for a particular (x,y) position. Remember: +z points into the element.
| Parameters: |
|
|---|
| Returns: |
|
|---|
zero_ele_kicks¶
Fortran source: bmad/modules/bmad_routine_interface.f90
zero_ele_kicks(ele: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine zero_ele_kicks
| Parameters: |
|
|---|
zero_ele_offsets¶
Fortran source: bmad/modules/bmad_routine_interface.f90
zero_ele_offsets(ele: pybmad._pybmad.EleStruct) -> None
Wrapper for Fortran routine zero_ele_offsets
| Parameters: |
|
|---|
zero_lr_wakes_in_lat¶
Fortran source: bmad/multiparticle/wake_mod.f90
zero_lr_wakes_in_lat(lat: pybmad._pybmad.LatStruct) -> None
Subroutine zero_lr_wakes_in_lat (lat)
Routine to zero the long range wake amplitudes for the elements that have long range wakes in a lattice.
| Parameters: |
|
|---|
zlafun¶
Fortran source: bmad/space_charge/open_spacecharge_core_mod.f90
zlafun(x: typing.SupportsFloat | typing.SupportsIndex, y: typing.SupportsFloat | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex, res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine zlafun
| Parameters: |
|
|---|