Commit 2a811b5c authored by Daniel Brown's avatar Daniel Brown

Better initilisation of astigmatic lens params

parent af108db5
......@@ -4627,7 +4627,12 @@ void set_ABCD_lens(int lens_index) {
lens->qx = make_ABCD(1.0, 0.0, -1 / X, 1.0);
}
double Y = lens->fy_of_Dy;
double Y ;
if(lens->is_astigmatic)
Y = lens->fy_of_Dy;
else
Y = lens->fx_of_Dx;
if (!lens->is_focal_length) {
Y = 1.0 / Y;
......
......@@ -2987,11 +2987,12 @@ void read_lens(const char *command_string, bool using_diopters, bool astigmatic)
} else {
lens->is_focal_length = true;
lens->fx_of_Dx = fx_or_Dx;
lens->fy_of_Dy = fy_or_Dy;
}
}
if(astigmatic){
if(!astigmatic){
lens->fy_of_Dy = 0;
} else {
lens->is_astigmatic = true;
if(using_diopters){
......
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