Skip to content

Commit

Permalink
matlab ohmienvelope add help message; add check_6d (#830)
Browse files Browse the repository at this point in the history
add help message; add check_6d
  • Loading branch information
oscarxblanco committed Sep 5, 2024
1 parent 12c5574 commit 98bd7f2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions atmat/atphysics/Radiation/ohmienvelope.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
function [envelope, rmsdp, rmsbl, varargout] = ohmienvelope(ring,radindex,refpts)
%OHMIENVELOPE calculates equilibrium beam envelope in a
% circular accelerator using Ohmi's beam envelope formalism [1]
% circular accelerator using Ohmi's beam envelope formalism [1].
% [1] K.Ohmi et al. Phys.Rev.E. Vol.49. (1994)
%
% [ENVELOPE, RMSDP, RMSBL] = ONMIENVELOPE(RING,RADELEMINDEX,REFPTS)
% [ENVELOPE, RMSDP, RMSBL] = OHMIENVELOPE(RING,RADELEMINDEX)
% [ENVELOPE, RMSDP, RMSBL] = OHMIENVELOPE(RING,RADELEMINDEX,REFPTS)
%
% RING - an AT ring.
% RADELEMINDEX - array of length equal to length(RING) filled with ones at
% indexes of radiative ring elements, otherwise, zeros.
% See the output of atenable_6d.
% REFPTS - reference points along the ring. Default: 1.
%
% ENVELOPE is a structure with fields
% Sigma - [SIGMA(1); SIGMA(2)] - RMS size [m] along
Expand All @@ -20,6 +27,10 @@
% [ENVELOPE, RMSDP, RMSBL, M66, T, ORBIT] = OHMIENVELOPE(...)
% Returns in addition the 6x6 transfer matrices and the closed orbit
% from FINDM66
%
% See also ATENABLE_6D FINDM66

check_6d(ring,true,'strict',0);

NumElements = length(ring);
if nargin<3, refpts=1; end
Expand Down

0 comments on commit 98bd7f2

Please sign in to comment.