Menu

#38 Max aperture is zero when fixed

wont-fix
None
2015-12-05
2015-12-04
letmaik
No

In previous versions, when the aperture was fixed, e.g. for "Nikon AF-S Zoom-Nikkor 17-35mm f/2.8D IF-ED" then the MinAperture and MaxAperture fields in the API had the same value. However, now (don't ask me when it changed, I just noticed it), MinAperture would be 2.8 and MaxAperture 0.0. Was there any reason for this change? In the docs it says for MaxAperture "Biggest f-number possible (ex: 22). Can be equal to MinAperture." In the header of the lfLens docs it says "Unknown fields are set to NULL or 0." To me this is just plain confusing and feels a bit unpredictable.

Discussion

  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    This is a documentation bug in my opinion. But additionally, we have this on our long-term to do list, as "min/max aperture" itself is confusing.

    Two years ago, we stopped guessing the max aperture from the lens name because too often it was incorrect. Moreover, we made a distinction between "only one aperture possible" and "max aperture unknown". In the first case, it is equal to "min aperture". In the latter case, it is zero.

    The original author himself didn't really know what max aperature should mean: In one place, he defined it as the minimal f-stop number at maximal zoom, and in another place, the maximal possible f-stop number.

    I think on the long run, the aperture should be replaced with "f-stop-number", and min/max refer to the global min/max values, no matter at which focal length. On the short run, the documentation shoule be fixed.

     

    Last edit: Torsten Bronger 2015-12-05
  • Torsten Bronger

    Torsten Bronger - 2015-12-05
    • status: open --> pending
    • assigned_to: Torsten Bronger
     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    At least in the main documentation, it is properly explained: http://lensfun.sourceforge.net/manual/el_lens.html

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    I went through all our docs and source code again and cannot find anything confusing. Actually, it is properly defined now, and in the release notes, the clarification of "max aperture" was explicitly mentioned. Note that before that, "max aperture" simply was not clearly defined in Lensfun. What exactly do you have to solve?

     
  • letmaik

    letmaik - 2015-12-05

    About what I have to solve: Well, just semantics. I'm the developer of the python wrapper lensfunpy and I want to properly expose the metadata so that there are no surprising moments.

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    Is https://goo.gl/eLJAUh good? If not, please send a patch with your suggestion.

     
  • letmaik

    letmaik - 2015-12-05

    So for the case of "Nikon AF-S Zoom-Nikkor 17-35mm f/2.8D IF-ED" where MinAperture is returned as 2.8 and MaxAperture as 0 that would mean it is not a fixed aperture lens. Does that make sense? Not really, right? Maybe you could phrase it the other way around: "If both MinAperture and MaxAperture have the same value, then the lens is a fixed aperture lens." If they are both non-zero and different it is clear that it is not fixed aperture. In the case of MaxAperture 0 you just don't know, could be fixed, could be variable. This phrasing would capture all cases. Of course, you could also make it more explicit even and don't rely on the inference/reasoning of devs to figure this out.

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    In my personal opinion, including the "0" case in the explanations makes them only more complicated. Actually, the minimal explanation is totally clear and correct:

    • Unknown fields are set to 0
    • MinAperture: Smallest f-number possible
    • MaxAperture: Biggest f-number possible
     
  • letmaik

    letmaik - 2015-12-05

    Ok, I think I agree, and the underlying issue as you said should probably be solved instead, like replacing it by f-stop number. I think basically I wanted to infer whether a lens is a fixed vs zoom lens, and I could imagine people writing code like if minAperture==maxAperture then "fixed" else "zoom" or something like that. Which would not be correct in all cases. So... maybe revert your doc string update again and let's postpone this issue.

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    For zoom, you have to check MinFocal and MaxFocal.

     
  • letmaik

    letmaik - 2015-12-05

    Oops, right... ok, feel free to close this issue and revert your doc change to the original. I think the main issue was my general confusion. I now know how to handle all cases.

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05

    Okay, all right then.

     
  • Torsten Bronger

    Torsten Bronger - 2015-12-05
    • status: pending --> wont-fix