Code covered by the BSD License
-
Effective refractive index of...
-
Optical Fibre Toolbox two-lay...
-
...
Finds all phase-matching points for the given modes
-
addPointsToMode(mode, range, ...
Adds points to the mode curve, trying to double their density
-
besselid(n, x)
Derivative of the modified Bessel function of the first kind
-
besseljd(n, x)
Derivative of the Bessel function of the first kind
-
besselkd(n, x)
Derivative of the modified Bessel function of the second kind
-
besselyd(n, x)
Derivative of the Bessel function of the second kind
-
buildModes(argument, fibreSpe...
Calculates the modal curves (n_eff vs d or n_eff vs lambda)
-
checkTask(task, fibre)
Verifies task correctness for the given fibre structure
-
colourVsLambda(x)
Returns a colour as corresponding to the given wavelength.
-
correctModeOrder(modetype, nu...
Checks that NU is allowed for such MODETYPE.
-
displayField2(F, d)
Creates plots of the mode field for two-layer structure
-
eve2LS(d, neff, lambda, fibre...
Eigen-value equations for vector two-layer structure modes
-
eve3LS(d, neff, lambda, fibre...
Eigen-value equations for three-layer structure modes
-
fibreForPM(par, RANGE, materi...
Returns possible phase-matching points for 2nd or 3rd harmonic generation
-
fibreMode(d, neff, lambda, fi...
General eigen-value equation function, calls eve2LS or eve3LS
-
fieldGrid(F)
Two-layer grid uniform in R and PHI, for displayField2
-
fieldPower(F)
Power in the mode field.
-
findModes(argument, par, fibr...
Returns starting points n_eff(arg) for all modes found according to task
-
findRoot(g, LIMITS, p)
Works on top of fzero, tries to make it work in larger number of cases.
-
modeCheckValue(modes)
Check-sum for the modes array.
-
modeDescription(mode, withPar...
Returns text description of the mode(s).
-
modeField(lambda, d, n_eff, f...
-
modeVsV(mode, region)
Returns the same mode with V-parameter as the argument
-
neff(poiType, poi, par, fibre...
Returns n_eff for particular mode and argument value
-
normalizePower(F, P)
Returns field structure normalised to the given power
-
overlapIntegral(pmp, rotation...
Overlap integral for two modes at a phase-matching point
-
partype(modes)
-
phaseMatch(mode1, mode2, info...
Tries to find a phase-match point on a between the two given modes
-
pmCheckValue(pmPoints, withOv...
Copyright: (cc-by) Subwavelength-diameter fibres team @ Uni Bonn, 2010
-
pmSameModes(pmp1, pmp2)
Returns TRUE if PMP1 and PMP2 are the intersections of the same two modes
-
pmpDescription(pmp, mode)
Creates a text description of a phase-matching point
-
refrIndex.m
-
setHarmonic(pmps)
Sets the HARMONIC parameter of a phase-matching point structure.
-
showModes(MODES, caption)
Displays modal curves for the MODES array.
-
showPMPoints(PMPOINTS)
Marks phase-matching points (mode curve intersections) on the current plot
-
styleVsModetype(modetype, nu)
Creates line-style understood by SET according to two-layer mode type
-
traceMode(StartArg, StartNeff...
Calculates the mode curve (n_eff vs d or lambda) starting from one point
-
vParameter(diameter, waveleng...
Returns the V-parameter for two-layer structures
-
Contents.m
-
bonnHG.m
-
grubskySavchenko.m
-
test2LS_3LS.m
-
vParameterDemo.m
-
View all files
from
Optical Fibre Toolbox
by Kotya Karapetyan
Simulation of optical fiber modes
|
| setHarmonic(pmps) |
function [pmpsNew, harmonics] = setHarmonic(pmps)
% Sets the HARMONIC parameter of a phase-matching point structure.
% Also sets HARMONIC of both modes within this structure.
% Copyright: (cc-by) Subwavelength-diameter fibres team @ Uni Bonn, 2010
% http://agmeschede.iap.uni-bonn.de, kotya.karapetyan@gmail.com
for i = 1:length(pmps)
pmp = pmps(i);
if strcmpi(pmp.argtype, 'WVL')
harmonic = max(pmp.mode1.harmonic, pmp.mode2.harmonic);
if abs(pmp.mode1.harmonic - pmp.mode2.harmonic) < 1e-6 % harmoincs are equal
error('Cannot determine the harmonic value now\n');
end;
elseif strcmpi(pmp.argtype, 'DIA')
if abs(mod(pmp.mode1.par, pmp.mode2.par)) < 1e-6
harmonic = round(pmp.mode1.par / pmp.mode2.par);
pmp.mode1.harmonic = 1;
pmp.mode2.harmonic = harmonic;
elseif abs(mod(pmp.mode2.par, pmp.mode1.par)) < 1e-6
pmp.mode2.harmonic = 1;
harmonic = round(pmp.mode2.par / pmp.mode1.par);
pmp.mode1.harmonic = harmonic;
else
error('Cannot determine the harmonic');
end
else
error('Invalid argtype');
end
if pmp.mode1.harmonic > pmp.mode2.harmonic
% shift modes so that first mode is fundamental
modeTemp = pmp.mode2;
pmp.mode2 = pmp.mode1;
pmp.mode1 = modeTemp;
neffTemp = pmp.neff1;
pmp.neff1 = pmp.neff2;
pmp.neff2 = neffTemp;
clear modeTemp;
clear neffTemp;
end;
pmp.harmonic = harmonic; % set harmonic in pmp itself too
harmonics(i) = harmonic; %#ok<AGROW>
pmpsNew(i) = pmp; %#ok<AGROW>
end;
|
|
Contact us