Commit e7e2127d authored by Daniel Brown's avatar Daniel Brown

Removing lock offset tuning as it led to circulating reference issues

parent d5532db0
......@@ -83,22 +83,11 @@ added features:
ad u $fs n3
ad l $mfs n3
o Lock offset: Can set the offset to a lock more easily now instead of having
to define a func and do the math.
Example:
l l1 10 0 0.0 n1
m m1 0 1 0 n1 n2
pd P n2
set P.re P re
lock test $P.re -0.01 1e-4 -2
put l1 P $test
xaxis test offset lin -1 -10 10
usage: lock name target gain accuracy [offset]
bug fixes:
......
......@@ -808,11 +808,7 @@ void read_file(FILE *fp) {
read_init_dummy(fp, 0);
} else if (strncasecmp(s, "/*", 2) == 0) {
read_init_dummy(fp, 1);
} else if (strncasecmp(s, "lock ", 5) == 0) {
read_lock_command(s);
} else if (strncasecmp(s, "lock* ", 6) == 0) {
read_lock2(s);
}
}
}
rewind(fp);
......@@ -873,9 +869,7 @@ void read_file(FILE *fp) {
insert_constants_values(s);
if (strncasecmp(s, "func ", 5) == 0) {
read_func_command(s);
} else if (strncasecmp(s, "showiterate ", 12) == 0) {
if (strncasecmp(s, "showiterate ", 12) == 0) {
read_showiterate(s);
} else if (strncasecmp(s, "gnuplot", 7) == 0) {
read_init_dummy(fp, 0);
......@@ -887,6 +881,12 @@ void read_file(FILE *fp) {
read_init_dummy(fp, 0);
} else if (strncasecmp(s, "/*", 2) == 0) {
read_init_dummy(fp, 1);
} else if (strncasecmp(s, "lock ", 5) == 0) {
read_lock_command(s);
} else if (strncasecmp(s, "lock* ", 6) == 0) {
read_lock2(s);
} else if (strncasecmp(s, "func ", 5) == 0) {
read_func_command(s);
}
}
......@@ -11226,13 +11226,11 @@ int assign_detector_parameter(component_param_t *component_param) {
assign_qd_detector_params(detector, component_param);
} else {
if (output_data->detector_type == UFUNCTION) {
if (output_data->detector_type == UFUNCTION || output_data->detector_type == FEEDBACK) {
bug_error("outtype FBACK 1");
}
if(output_data->detector_type == FEEDBACK){
assign_lock_params(&inter.lock_list[output_data->detector_index], component_param);
} else {
int detector_index = output_data->detector_index;
light_out_t *detector = &inter.light_out_list[detector_index];
......@@ -11393,14 +11391,16 @@ int assign_beam_parameter(component_param_t *component_param) {
return (0);
}
void assign_lock_params( lock_command_t *lock, component_param_t *component_param) {
if (strcasecmp("offset", component_param->parameter) == 0) {
*component_param->xparam = &(lock->offset);
strcpy(component_param->unit, " [au]");
*component_param->lborder = 0;
*component_param->uborder = 0;
}
}
// ddb - Removed as decided against locks having tunable parameters due to
// cyclic reference issues with variables and functions, etc.
//void assign_lock_params( lock_command_t *lock, component_param_t *component_param) {
// if (strcasecmp("offset", component_param->parameter) == 0) {
// *component_param->xparam = &(lock->offset);
// strcpy(component_param->unit, " [au]");
// *component_param->lborder = 0;
// *component_param->uborder = 0;
// }
//}
void assign_homodyne_detector_params(
homodyne_t *hom,
......
......@@ -198,7 +198,7 @@ int assign_one_demod_detector_params(light_out_t *detector, component_param_t *c
int assign_multi_demod_detector_params(light_out_t *detector, component_param_t *component_param);
int assign_beam_parameter(component_param_t *component_param);
int assign_tf_parameter(component_param_t *component_param);
void assign_lock_params( lock_command_t *lock, component_param_t *component_param);
//void assign_lock_params( lock_command_t *lock, component_param_t *component_param);
void init_beamsplitter_signal(signal_t *signal,
int component_index,
......
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