Commit 4eab8990 authored by Daniel Brown's avatar Daniel Brown

adding in sagnac fsig for space

parent be4197ab
......@@ -521,6 +521,8 @@ int get_signal_type(char *signal_type_string) {
return SIG_X;
} else if (string_matches_exactly(signal_type_string, "y")) {
return SIG_Y;
} else if (string_matches_exactly(signal_type_string, "sagnac")) {
return SIG_SAGNAC;
} else if (signal_type_string[0] == 's' && isdigit(signal_type_string[1])) {
// check if we are trying to drive a surface mode
return SIG_SURF;
......
......@@ -1530,7 +1530,7 @@ void fill_space_signal_rhs(signal_t *signal, ifo_matrix_vars_t* M_car, ifo_matri
int f;
space_t *space = &inter.space_list[signal->component_index];
if (signal->type == SIG_PHS) {
if (signal->type == SIG_PHS || signal->type == SIG_SAGNAC) {
double ph1;
for(f=0; f < M_sig->num_frequencies; f++){
......@@ -1593,6 +1593,12 @@ void fill_space_signal_rhs(signal_t *signal, ifo_matrix_vars_t* M_car, ifo_matri
sig_vec = &(((complex_t*)M_sig->rhs_values)[sidx]);
car_vec = &(((complex_t*)M_car->rhs_values)[cidx]);
if(signal->type == SIG_SAGNAC) {
// Sagnac effect is doing opposite sign of phase for modulation
// when going in the opposite direction
ph1 *= -1;
}
cblas_zgemv (CblasRowMajor, CblasNoTrans, inter.num_fields, inter.num_fields,
&complex_1, &(space->k21[0][0]), inter.num_fields, car_vec, 1, &complex_0, sig_vec, 1);
......
......@@ -359,6 +359,7 @@
#define SIG_FSURF 10
#define SIG_Z 11
#define NOSIGNAL 12 /** No signal applied, just a name given to signal frequency */
#define SIG_SAGNAC 13
/* phasemap types */
#define PM_REFL 1 //!< Reflection phasemap from file
......
......@@ -6725,8 +6725,8 @@ void read_fsig(const char *command_string) {
}
double signal_amplitude = 0.0;
if ((num_vars_read == 6 && NOT type_is_set) ||
(num_vars_read == 7 && type_is_set)) {
if ((num_vars_read == 6 && NOT type_is_set) || (num_vars_read == 7 && type_is_set)) {
if (atod(amplitude_string, &signal_amplitude)) {
gerror("Line `%s':\nUnable to read signal amplitude\n", command_string);
}
......@@ -6904,8 +6904,7 @@ void init_space_signal(
assert(signal->node2_reduced_index < inter.num_reduced_nodes);
if (type_is_set) {
if (signal->type != SIG_AMP &&
signal->type != SIG_PHS) {
if (signal->type != SIG_AMP && signal->type != SIG_PHS && signal->type != SIG_SAGNAC) {
gerror("Line `%s':\ninvalid signal type for a space\n", command_string);
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment