Gitlab will migrate to a new storage backend starting 0300 UTC on 2020-04-04. We do not anticipate a maintenance window for this migration. Performance may be impacted over the weekend. Thanks for your patience.

Commit c089a394 authored by Daniel Brown's avatar Daniel Brown

Adding map amplitude parameter

parent 11bdf6e8
......@@ -635,6 +635,8 @@ typedef struct surface_merged_map {
/** True if a transmission map is merged into this */
bool hasTransmissionMaps;
double map_amplitude;
knm_workspace_t knm_ws;
} surface_merged_map_t;
......@@ -770,6 +772,8 @@ typedef struct mirror {
double r_aperture; //!< physical size of mirror, infinite if set to 0
aperture_type_t aperture_type;
double map_amplitude;
double x_off;
double y_off;
double Rcx; //!< radius of curvature in x plane (tangential)
......
......@@ -1272,9 +1272,9 @@ void compute_mirror_knm_integral(mirror_t *mirror, double nr1, double nr2, bitfl
recompute = recompute | (map->_nr1 != nr1);
recompute = recompute | (map->_nr2 != nr2);
recompute = recompute | (map->_angle != mirror->angle);
recompute = recompute | !eq(mirror->map_amplitude, map->map_amplitude);
recompute = recompute | !ceq(mirror->knm_q.qxt1_11, map->mirror_knm_q.qxt1_11);
recompute = recompute | !ceq(mirror->knm_q.qxt2_11, map->mirror_knm_q.qxt2_11);
recompute = recompute | !ceq(mirror->knm_q.qyt1_11, map->mirror_knm_q.qyt1_11);
......@@ -1666,10 +1666,10 @@ void compute_mirror_knm_integral(mirror_t *mirror, double nr1, double nr2, bitfl
ipfile = NULL;
}
knm->k11[n][m] = results[0];
knm->k12[n][m] = results[1];
knm->k21[n][m] = results[2];
knm->k22[n][m] = results[3];
knm->k11[n][m] = z_by_x(results[0], mirror->map_amplitude);
knm->k12[n][m] = z_by_x(results[1], mirror->map_amplitude);
knm->k21[n][m] = z_by_x(results[2], mirror->map_amplitude);
knm->k22[n][m] = z_by_x(results[3], mirror->map_amplitude);
// If we have a mode matched beam we are able to calculate the transposed
// elements by applying a simple phase factor
......@@ -1704,7 +1704,7 @@ void compute_mirror_knm_integral(mirror_t *mirror, double nr1, double nr2, bitfl
map->_lambda = init.lambda;
map->_nr1 = nr1;
map->_nr2 = nr2;
map->map_amplitude = mirror->map_amplitude;
map->mirror_knm_q.qxt1_11 = mirror->knm_q.qxt1_11;
map->mirror_knm_q.qxt2_11 = mirror->knm_q.qxt2_11;
map->mirror_knm_q.qyt1_11 = mirror->knm_q.qyt1_11;
......
......@@ -10584,7 +10584,14 @@ int assign_mirror_parameter(component_param_t *component_param) {
strcpy(component_param->unit, " [deg]");
*component_param->lborder = 0;
*component_param->uborder = 0;
} else if (strcasecmp("map_amp", component_param->parameter) == 0){
*component_param->xparam = &(mirror->map_amplitude);
mirror->rebuild = 1;
inter.rebuild |= 1;
strcpy(component_param->unit, " [real]");
*component_param->lborder = -1;
*component_param->uborder = 1;
} else if (strcasecmp("dither_f", component_param->parameter) == 0) {
*component_param->xparam = &(mirror->dither_f);
strcpy(component_param->unit, " [Hz]");
......
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