Commit c42b73b4 authored by Daniel Brown's avatar Daniel Brown
Browse files

First attempt at yaw/pitch modulator

parent b22ae086
......@@ -1752,18 +1752,18 @@ typedef struct modulator {
coupling_info_t a_cplng_12, a_cplng_21;
//! coupling coefficient for TEM mode from mode 1 into mode 2
//! coupling coefficient for TEM mode from node 1 into node 2
complex_t **k12;
//! coupling coefficient for TEM mode from mode 2 into mode 1
//! coupling coefficient for TEM mode from node 2 into node 1
complex_t **k21;
complex_t **ktm12; // Tilt modulation scattering matrix
complex_t **ktm21; // Tilt modulation scattering matrix
double *k12_sqrd_sum;
double *k21_sqrd_sum;
ABCD_t qq; //!< transformation matrix for q of modulator
complex_t ***q12; //!< quantum noise matrix element mode 1 -> mode 2
complex_t ***q21; //!< quantum noise matrix element mode 2 -> mode 1
bitflag knm_flags;
......
......@@ -40,6 +40,7 @@
#include "kat_knm_bayer.h"
#include "kat_knm_aperture.h"
#include "kat_calc.h"
#include "kat_knm_int.h"
#include <gsl/gsl_cblas.h>
#include <stdlib.h>
......@@ -69,8 +70,52 @@ const ABCD_t Unity = {1.0, 0.0, 0.0, 1.0}; //!< The identity matrix
int n_index; //!< node index; number of nodes in beam trace
bool defaultKNMChangeWarning = false;
zmatrix tmp_knm = NULL;
//! Compute coupling coefficients between two beams
/**
* Computes matrix product:
* C = A*B
*
* @param A
* @param B
* @param C
*/
void knm_matrix_mult(zmatrix A, zmatrix B, zmatrix C) {
assert(A != NULL);
assert(B != NULL);
assert(C != NULL);
zmatrix tmp = NULL;
// if result != A | B then no need to use a temporary matrix to store result
// just bung it in the result matrix
if ((C == A) || (C == B))
tmp = tmp_knm;
else
tmp = C;
size_t n,m,l;
for (n = 0; n < mem.num_fields; n++) {
for (m = 0; m < mem.num_fields; m++) {
// initialise to 0 here just incase some other data is there
tmp[n][m] = complex_0;
for (l = 0; l < mem.num_fields; l++) {
tmp[n][m] = z_pl_z(tmp[n][m], z_by_z(A[n][l], B[l][m]));
}
}
}
// if either A or B is the target matrix to store the result
// we need to copy over the result
if ((C == A) || (C == B))
memcpy(C[0], tmp[0], mem.num_fields * mem.num_fields * sizeof (complex_t));
}
/*!
* Each coefficient describes the coupling of the TEM_n1m1 mode into the
* TEM_n2m2 mode as a function of the misalignments (gamma_x, gamma_y). In
......@@ -225,16 +270,14 @@ complex_t k_nmnm(int n1, int m1, int n2, int m2, complex_t qx1, complex_t qy1,
// to the complex amplitude coefficiants in every `space' whereas the
// coupling coefficients are derived using a formula in which the Gouy
// phase is implicitly given by spacial distribution.
// 22/02/2012 This will be moved to after the knm merging - Daniel
z = rev_gouy(z, n1, m1, n2, m2, qx1, qx2, qy1, qy2);
return (z);
}
// same as above but withoyt rev_gouy, to be used with new set_k_mirror function
// same as above but without rev_gouy, to be used with new set_k_mirror function
complex_t k_nmnm_new(int n1, int m1, int n2, int m2, complex_t qx1, complex_t qy1,
complex_t qx2, complex_t qy2, double gamma_x, double gamma_y,
double nr, const unsigned int knm_flag) {
complex_t qx2, complex_t qy2, double gamma_x, double gamma_y, double nr, const unsigned int knm_flag) {
complex_t z, z1, z2, ztmp;
// sanity checks on inputs
......@@ -770,7 +813,7 @@ void set_coupling_info() {
int j;
for(j=0; j<2; j++){
if(!options.use_coupling_reduction) {
if(!options.use_coupling_reduction || (mod->type == MODTYPE_YAW || mod->type == MODTYPE_PITCH)) {
__set_no_reduce_coupling_info(v[j]);
} else {
v[j]->coupling_off = !(mod->mismatching & pow_two(j));
......@@ -2540,12 +2583,11 @@ int set_k_modulator(int modulator_index) {
double nr1, nr2;
complex_t kx, ky;
double kmx, kmy;
double phase = 0.0;
complex_t qx1, qy1, qx2, qy2;
complex_t qxt, qyt;
complex_t qxt2, qyt2;
modulator_t *modulator;
modulator_t *mod;
node_t node1, node2;
// sanity check on input
......@@ -2554,10 +2596,10 @@ int set_k_modulator(int modulator_index) {
assert(modulator_index >= 0);
assert(modulator_index < inter.num_modulators);
modulator = &(inter.modulator_list[modulator_index]);
mod = &(inter.modulator_list[modulator_index]);
component = get_overall_component_index(MODULATOR, modulator_index);
node1_index = modulator->node1_index;
node2_index = modulator->node2_index;
node1_index = mod->node1_index;
node2_index = mod->node2_index;
nr1 = nr2 = init.n0;
......@@ -2591,25 +2633,24 @@ int set_k_modulator(int modulator_index) {
}
if (nr1 != nr2) {
gerror("index of refraction not consistent at modulator '%s'\n",
modulator->name);
gerror("index of refraction not consistent at modulator '%s'\n", mod->name);
}
if (inter.debug & 32 || inter.trace & 64) {
message("%s :\n", modulator->name);
message("%s :\n", mod->name);
}
modulator->mismatching = 0;
mod->mismatching = 0;
if (NOT node1.gnd_node &&
NOT node2.gnd_node) {
if (NOT node1.gnd_node && NOT node2.gnd_node) {
qxt = qx1;
qyt = qy1;
qxt2 = qx2;
qyt2 = qy2;
if (!ceq(qxt, qxt2) || !ceq(qyt, qyt2)) {
modulator->mismatching |= 1;
mod->mismatching |= 1;
}
if (inter.trace & 64) {
......@@ -2625,13 +2666,8 @@ int set_k_modulator(int modulator_index) {
message("k12");
}
if (inter.set_tem_phase_zero & 1) {
phase = zphase(k_nmnm(0, 0, 0, 0, qxt, qyt, qxt2, qyt2, 0.0, 0.0, nr2, modulator->knm_flags));
} else {
phase = 0.0;
}
int n, m;
for (n = 0; n < inter.num_fields; n++) {
for (m = 0; m < inter.num_fields; m++) {
get_tem_modes_from_field_index(&n1, &m1, n);
......@@ -2640,11 +2676,10 @@ int set_k_modulator(int modulator_index) {
n2 == NOT_FOUND || m2 == NOT_FOUND) {
bug_error("notfound 1");
}
modulator->k12[n][m] =
z_by_phr(k_nmnm(n1, m1, n2, m2, qxt, qyt, qxt2, qyt2, 0.0, 0.0, nr2, modulator->knm_flags),
-phase);
if (inter.debug & 32 && !ceq(complex_0, modulator->k12[n][m])) {
message(" [%d, %d]=%s, ", n, m, complex_form(modulator->k12[n][m]));
mod->k12[n][m] = k_nmnm_new(n1, m1, n2, m2, qxt, qyt, qxt2, qyt2, 0.0, 0.0, nr2, mod->knm_flags);
if (inter.debug & 32 && !ceq(complex_0, mod->k12[n][m])) {
message(" [%d, %d]=%s, ", n, m, complex_form(mod->k12[n][m]));
}
}
......@@ -2662,8 +2697,9 @@ int set_k_modulator(int modulator_index) {
qyt = cminus(cconj(qy2));
qxt2 = cminus(cconj(qx1));
qyt2 = cminus(cconj(qy1));
if (!ceq(qxt, qxt2) || !ceq(qyt, qyt2)) {
modulator->mismatching |= 2;
mod->mismatching |= 2;
}
if (inter.trace & 64) {
......@@ -2679,12 +2715,6 @@ int set_k_modulator(int modulator_index) {
message("k21");
}
if (inter.set_tem_phase_zero & 1) {
phase = zphase(k_nmnm(0, 0, 0, 0, qxt, qyt, qxt2, qyt2, 0.0, 0.0, nr1, modulator->knm_flags));
} else {
phase = 0.0;
}
for (n = 0; n < inter.num_fields; n++) {
for (m = 0; m < inter.num_fields; m++) {
get_tem_modes_from_field_index(&n1, &m1, n);
......@@ -2693,11 +2723,10 @@ int set_k_modulator(int modulator_index) {
n2 == NOT_FOUND || m2 == NOT_FOUND) {
bug_error("notfound 2");
}
modulator->k21[n][m] =
z_by_phr(k_nmnm(n1, m1, n2, m2, qxt, qyt, qxt2, qyt2,
0.0, 0.0, nr1, modulator->knm_flags), -phase);
if (inter.debug & 32 && !ceq(complex_0, modulator->k21[n][m])) {
message(" [%d, %d]=%s, ", n, m, complex_form(modulator->k21[n][m]));
mod->k21[n][m] = k_nmnm_new(n1, m1, n2, m2, qxt, qyt, qxt2, qyt2, 0.0, 0.0, nr1, mod->knm_flags);
if (inter.debug & 32 && !ceq(complex_0, mod->k21[n][m])) {
message(" [%d, %d]=%s, ", n, m, complex_form(mod->k21[n][m]));
}
}
......@@ -2710,19 +2739,170 @@ int set_k_modulator(int modulator_index) {
message("\n");
}
}
if (mod->type == MODTYPE_PITCH || mod->type == MODTYPE_YAW) {
// If we have a tilt modulation we need to compute the HOM scattering
// into the HOM's of the RF sidebands.
// First zero the scattering matrices...
memset(&(mod->ktm12[0][0]), 0, inter.num_fields * inter.num_fields * sizeof(complex_t));
memset(&(mod->ktm21[0][0]), 0, inter.num_fields * inter.num_fields * sizeof(complex_t));
/**
* Here I assume that the modulation index has been chosen to be small.
* Thus the Bessel functions can be linearised and the coupling matrix
* is similar to that of the equations in Daniel Brown's PhD thesis
* appendix C.11 and C.12.
**/
{
complex_t q1, q2;
if(!node1.gnd_node){
// q at node 1 calculated is that of the mode coming into the
// modulator from node 1, thus needs to be reversed
if (mod->type == MODTYPE_YAW) {
q1 = cminus(cconj(qx1));
} else {
q1 = cminus(cconj(qy1));
}
}
if(!node2.gnd_node){
if (mod->type == MODTYPE_YAW) {
q2 = qx2;
} else {
q2 = qy2;
}
}
int i=0, d=0, u=0;
double gouy_1 = gouy(q1);
double gouy_2 = gouy(q2);
double w1 = w_size(q1, nr1);
double w2 = w_size(q2, nr2);
complex_t factor12 = complex_1;
complex_t factor21 = complex_1;
for(i=0; i<inter.num_fields; i++) {
int tn=0, tm=0;
get_tem_modes_from_field_index(&tn, &tm, i);
d = -1;
if(mod->type == MODTYPE_YAW) {
if(tn+1 + tm <= inter.tem) {
u = get_field_index_from_tem(tn+1, tm);
if(!node1.gnd_node) mod->ktm21[i][u] = z_by_xphr(complex_1, w1 * sqrt(tn+1)/2.0, gouy_1);
if(!node2.gnd_node) mod->ktm12[i][u] = z_by_xphr(complex_1, w2 * sqrt(tn+1)/2.0, gouy_2);
}
if(tn-1 >= 0) {
d = get_field_index_from_tem(tn-1, tm);
if(!node1.gnd_node) mod->ktm21[i][d] = z_by_xphr(complex_1, w1 * sqrt(tn)/4.0, -gouy_1);
if(!node2.gnd_node) mod->ktm12[i][d] = z_by_xphr(complex_1, w2 * sqrt(tn)/4.0, -gouy_2);
}
} else {
if(tn+1 + tm <= inter.tem) {
u = get_field_index_from_tem(tn, tm+1);
if(!node1.gnd_node) mod->ktm21[i][u] = z_by_xphr(complex_1, w1 * sqrt(tm+1)/2.0, gouy_1);
if(!node2.gnd_node) mod->ktm12[i][u] = z_by_xphr(complex_1, w2 * sqrt(tm+1)/2.0, gouy_2);
}
if(tm-1 >= 0) {
d = get_field_index_from_tem(tn, tm-1);
if(!node1.gnd_node) mod->ktm21[i][d] = z_by_xphr(complex_1, w1 * sqrt(tm)/4.0, -gouy_1);
if(!node2.gnd_node) mod->ktm12[i][d] = z_by_xphr(complex_1, w2 * sqrt(tm)/4.0, -gouy_2);
}
}
if(tn+1 + tm <= inter.tem) {
// Set the transpose elements and scaling
mod->ktm12[u][i] = z_by_zc(factor12, mod->ktm12[i][u]);
mod->ktm21[u][i] = z_by_zc(factor21, mod->ktm21[i][u]);
// apply scaling factors which aren't conjugated
mod->ktm12[i][u] = z_by_z(factor12, mod->ktm12[i][u]);
mod->ktm21[i][u] = z_by_z(factor21, mod->ktm21[i][u]);
}
if(d >= 0) {
// Set the transpose elements and scaling
mod->ktm12[d][i] = z_by_zc(factor12, mod->ktm12[i][d]);
mod->ktm21[d][i] = z_by_zc(factor21, mod->ktm21[i][d]);
// apply scaling factors which aren't conjugated
mod->ktm12[i][d] = z_by_z(factor12, mod->ktm12[i][d]);
mod->ktm21[i][d] = z_by_z(factor21, mod->ktm21[i][d]);
}
}
}
// Now combine any mode mismatch in the Bayer-Helms matrix
// with the tilt scattering matrix to get the full coupling
knm_matrix_mult(mod->k12, mod->ktm12, mod->ktm12);
knm_matrix_mult(mod->k21, mod->ktm21, mod->ktm21);
}
// Need to merge matrices and do some reversing of the Gouy phase on the
// combined matrices now.
int n, m;
memset(modulator->k12_sqrd_sum, 0, sizeof(double) * inter.num_fields);
memset(modulator->k21_sqrd_sum, 0, sizeof(double) * inter.num_fields);
for (n = 0; n < inter.num_fields; n++) {
get_tem_modes_from_field_index(&n1, &m1, n);
for (m = 0; m < inter.num_fields; m++) {
get_tem_modes_from_field_index(&n2, &m2, m);
//warn("knm %i%i->%i%i: %s %s\n", n1,m1,n2,m2, complex_form(mod->k12[n][m]), complex_form(mod->k21[n][m]));
mod->k12[n][m] = rev_gouy(mod->k12[n][m], n1, m1, n2, m2, qx1, qx2, qy1, qy2);
mod->k21[n][m] = rev_gouy(mod->k21[n][m], n1, m1, n2, m2, cminus(cconj(qx2)), cminus(cconj(qx1)), cminus(cconj(qy2)), cminus(cconj(qy1)));
//warn("ktm %i%i->%i%i: %s %s\n", n1,m1,n2,m2, complex_form(mod->ktm12[n][m]), complex_form(mod->ktm21[n][m]));
mod->ktm12[n][m] = rev_gouy(mod->ktm12[n][m], n1, m1, n2, m2, qx1, qx2, qy1, qy2);
mod->ktm21[n][m] = rev_gouy(mod->ktm21[n][m], n1, m1, n2, m2, cminus(cconj(qx2)), cminus(cconj(qx1)), cminus(cconj(qy2)), cminus(cconj(qy1)));
}
}
double p12=0, p21=0, p12tm=0, p21tm=0;
if(inter.set_tem_phase_zero & 1) {
p12 = zphase(mod->k12[0][0]);
p21 = zphase(mod->k21[0][0]);
p12tm = zphase(mod->ktm12[0][0]);
p21tm = zphase(mod->ktm21[0][0]);
for (n = 0; n < inter.num_fields; n++) {
for (m = 0; m < inter.num_fields; m++) {
mod->k12[n][m] = z_by_phr(mod->k12[n][m], -p12);
mod->k21[n][m] = z_by_phr(mod->k21[n][m], -p21);
mod->ktm12[n][m] = z_by_phr(mod->ktm12[n][m], -p12tm);
mod->ktm21[n][m] = z_by_phr(mod->ktm21[n][m], -p21tm);
}
}
}
memset(mod->k12_sqrd_sum, 0, sizeof(double) * inter.num_fields);
memset(mod->k21_sqrd_sum, 0, sizeof(double) * inter.num_fields);
for (n = 0; n < inter.num_fields; n++) {
for (m = 0; m < inter.num_fields; m++) {
modulator->k12_sqrd_sum[n] += zabs(modulator->k12[n][m]);
modulator->k21_sqrd_sum[n] += zabs(modulator->k21[n][m]);
mod->k12_sqrd_sum[n] += zabs(mod->k12[n][m]);
mod->k21_sqrd_sum[n] += zabs(mod->k21[n][m]);
}
}
return (modulator->mismatching);
return (mod->mismatching);
}
//! Set coupling coefficients for the given diode
......
......@@ -32,6 +32,7 @@
#define DELTA_FUNC(n1,n2,m1,m2) ((n1 == n2) && (m1 == m2) ? ((n1 == m1) ? complex_1 : complex_0) : complex_0)
void set_coupling_info();
void knm_matrix_mult(zmatrix A, zmatrix B, zmatrix C);
inline complex_t rev_gouy(complex_t k, int n1, int m1, int n2, int m2,
complex_t qx1, complex_t qx2, complex_t qy1, complex_t qy2);
......
......@@ -1974,7 +1974,7 @@ int get_field_index_from_tem(int n, int m) {
int field;
// sanity checks on inputs
// n and m both must be greather than or equal to zero
// n and m both must be greater than or equal to zero
assert(m >= 0);
assert(n >= 0);
......
......@@ -159,6 +159,8 @@
#define MODTYPE_AM 10 //!< Amplitude modulation type
#define MODTYPE_PM 20 //!< Phase modulation type
#define MODTYPE_YAW 30 //!< Tilt modulation yaw type
#define MODTYPE_PITCH 40 //!< Tilt modulation pitch type
/* photo detector types */
#define AD 1 //!< Amplitude detector
......
......@@ -67,6 +67,7 @@ typedef struct cuba_int_params {
KNM_COMPONENT_t knmcmp;
} cuba_int_params_t;
/**
* Produces a composite rule for Newton-Cotes based integration.
*
......
......@@ -70,6 +70,7 @@ typedef struct ifo_matrix_vars{
// modulators, mirrors and beamsplitters are the only component that can couple frequencies. Signal frequencies from
// other components are handled by including them as sources to the signal sideband matrix
int ***mod_f_couple_order; // order of coupling if equivalent mod_does_f_couple is non-zero
int ***mod_does_f_couple; // 0 if no coupling, 1 if there is
int ***mod_f_couple_allocd; // 0 if no memory is to be allocated 1 if it is
......@@ -78,7 +79,7 @@ typedef struct ifo_matrix_vars{
int ***m_does_f_couple; // 0 if no coupling, 1 if there is
int ***m_f_couple_allocd; // 0 if no memory is to be allocated 1 if it is
int ***bs_f_couple_order; // order of coupling if equivalent m_does_f_couple is non-zero
int ***bs_f_couple_order; // order of coupling if equivalent bs_does_f_couple is non-zero
int ***bs_does_f_couple; // 0 if no coupling, 1 if there is
int ***bs_f_couple_allocd; // 0 if no memory is to be allocated 1 if it is
......
......@@ -58,6 +58,8 @@ extern bs_knm_t bstmp;
extern bs_knm_t bstmap;
extern mirror_knm_t mrtmap;
extern zmatrix tmp_knm;
complex_t *car_ws = NULL;
/** The idea of this function is to allocate memory dynamically for a complex_t
......@@ -1157,6 +1159,11 @@ int allocate_memory(long int *bytes, long int *bytes1, long int *bytes2) {
}
*bytes1 += (mem.num_outputs + 1) * sizeof (complex_t);
if(mem.num_fields > 0 && inter.tem_is_set){
// temp memory for knm matrix operations
allocate_zmatrix(&tmp_knm, mem.num_fields, bytes);
}
// allocate memory for quantum node list
if(mem.num_quantum_components || inter.all_quantum_components) {
if(inter.all_quantum_components) {
......@@ -2337,21 +2344,28 @@ int allocate_memory_for_mirror_phase_list(long int *bytes) {
*/
int allocate_memory_for_modulator_list(long int *bytes) {
if (mem.num_modulators) {
inter.modulator_list = (modulator_t *)
calloc(mem.num_modulators + 1, sizeof (modulator_t));
inter.modulator_list = (modulator_t *) calloc(mem.num_modulators + 1, sizeof (modulator_t));
if (inter.modulator_list == NULL) {
return (16);
}
*bytes += (mem.num_modulators + 1) * sizeof (modulator_t);
// field amplitudes
int i;
for (i = 0; i < mem.num_modulators; i++) {
inter.modulator_list[i].comp_index = i;
allocate_zmatrix(&inter.modulator_list[i].k12, mem.num_fields, bytes);
allocate_zmatrix(&inter.modulator_list[i].k21, mem.num_fields, bytes);
// could probably be efficient and parse the modulation type to check
// if actually using tilt modulation here.
allocate_zmatrix(&inter.modulator_list[i].ktm12, mem.num_fields, bytes);
allocate_zmatrix(&inter.modulator_list[i].ktm21, mem.num_fields, bytes);
modulator_t *m = &inter.modulator_list[i];
int err;
......
......@@ -5986,7 +5986,7 @@ void read_dither(const char *command_string) {
void read_modulator(const char *command_string) {
char command_name[MAX_TOKEN_LEN] = {0};
char object_name[MAX_TOKEN_LEN] = {0};
char ampm[MAX_TOKEN_LEN] = {0};
char mod_type[MAX_TOKEN_LEN] = {0};
char frequency_string[LINE_LEN] = {0};
char modulation_index_string[LINE_LEN] = {0};
char phase_string[LINE_LEN] = {0};
......@@ -6011,20 +6011,20 @@ void read_modulator(const char *command_string) {
int num_vars_read = sscanf(command_string,
"%s %s %s %s %d %3s %s %s %s %80s",
command_name, object_name, frequency_string, modulation_index_string,
&modulation_order, ampm, phase_string, node1_name, node2_name,
&modulation_order, mod_type, phase_string, node1_name, node2_name,
rest_string);
if (num_vars_read < 9) {
num_vars_read = sscanf(command_string,
"%s %s %s %s %d %3s %s %s %80s",
command_name, object_name, frequency_string, modulation_index_string,
&modulation_order, ampm, node1_name, node2_name, rest_string);
&modulation_order, mod_type, node1_name, node2_name, rest_string);
if (num_vars_read < 8) {
num_vars_read = sscanf(command_string,
"%s %s %s %s %1s %3s %s %s %s %80s",
command_name, object_name, frequency_string, modulation_index_string,
single_sideband_mode_string, ampm, phase_string,
single_sideband_mode_string, mod_type, phase_string,
node1_name, node2_name, rest_string);
if (num_vars_read < 9 ||
......@@ -6032,13 +6032,13 @@ void read_modulator(const char *command_string) {
num_vars_read = sscanf(command_string,
"%s %s %s %s %1s %3s %s %s %80s",
command_name, object_name, frequency_string,
modulation_index_string, single_sideband_mode_string, ampm,
modulation_index_string, single_sideband_mode_string, mod_type,
node1_name, node2_name, rest_string);
if (num_vars_read < 8 ||
strncasecmp(single_sideband_mode_string, "s", 1)) {
gerror("Line `%s':\n"
"expected 'mod name f midex order am/pm "
"expected 'mod name f midex order am/pm/yaw/pitch "
"[phase] node1 node2'\n", command_string);
} else {
if (num_vars_read > 8) {
......@@ -6077,13 +6077,17 @@ void read_modulator(const char *command_string) {
modulator->single_sideband_mode = OFF;
}
if (strncasecmp(ampm, "am", 2) == 0) {
if (strncasecmp(mod_type, "am", 2) == 0) {
modulator->type = MODTYPE_AM;
} else if (strncasecmp(ampm, "pm", 2) == 0) {
} else if (strncasecmp(mod_type, "pm", 2) == 0) {
modulator->type = MODTYPE_PM;
} else if (strncasecmp(mod_type, "yaw", 3) == 0) {
modulator->type = MODTYPE_YAW;
} else if (strncasecmp(mod_type, "pitch", 5) == 0) {
modulator->type = MODTYPE_PITCH;
} else {
gerror("Line `%s':\n"
"expected 'mod name f midex order am/pm node1 node2'\n",
"expected 'mod name f midex order am/pm/yaw/pitch node1 node2'\n",
command_string);
}
......@@ -6111,6 +6115,7 @@ void read_modulator(const char *command_string) {
modulation_index = 1;
}
}
modulator->modulation_index = modulation_index;
modulator->order = modulation_order;
......@@ -6209,7 +6214,7 @@ int get_modulation_order(const char *command_string) {
node1_name, node2_name, rest_string);
if (num_vars_read < 7 || strncasecmp(single_sideband_mode, "s", 1)) {
gerror("Line `%s':\n"
"expected 'mod name f midex order am/pm [phase] "
"expected 'mod name f midex order am/pm/yaw/pitch [phase] "
"node1 node2'\n", command_string);
}
}
......@@ -6250,9 +6255,13 @@ int get_modulation_order(const char *command_string) {
modulation_type = MODTYPE_AM;
} else if (strncasecmp(ampm, "pm", 2) == 0) {
modulation_type = MODTYPE_PM;
} else if (strncasecmp(ampm, "yaw", 3) == 0) {
modulation_type = MODTYPE_YAW;
} else if (strncasecmp(ampm, "pitch", 5) == 0) {