Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unuseful error message from aspheric coefficients if surfaces section is missing #231

Open
Latios96 opened this issue Feb 11, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Latios96
Copy link
Owner

I the following lens file example the surfaces section is missing and aspheric coefficents are specified. When parsing, the parser will complain that 1 is an invalid index and [0-0] would be valid. This is unintitive, check for surfaces section first

Lens file example:

[Metadata]
Name: Panavision
Focal Length: 19.7
Maximum F Number: 1.87
Squeeze: 1
Elements Count: 57
[Elements]
Radius   Thickness IOR    Housing-Radius Abbe-No Material       Geometry   
219      5         1.44   50.1           94.94       OHARA_S_FPL53  SPHERICAL  
38.5     23.5      1      38.2           0       AIR            SPHERICAL    
222      3.8       1.62   35.3           63.4       OHARA_S_PHM52  SPHERICAL  
43.2     5.3       1      30.7           0       AIR            SPHERICAL  
51.3     15.6      1.8052 30.7           25.43   UNKNOWN        SPHERICAL  # PBH6W 
77       0.1       1      27.5           0       AIR            SPHERICAL  
43.2     7.7       1.44   26.5           95.0       OHARA_S_FPL53  SPHERICAL  
55.6     4.54      1      24.8           0       AIR            SPHERICAL  
130      5.18      1.6364 24.5           35.38   UNKNOWN        SPHERICAL  # PBM6   
-318     2.2       1.8    23.9           39.6       OHARA_S_LAH63Q SPHERICAL  
97.7     3.87      1      22.5           0       AIR            SPHERICAL  
-516     2.17      1.762  22.3           40.10   UNKNOWN        SPHERICAL  
86.5     0.7       1      21.6           0       AIR            SPHERICAL  
44.5     3.56      1.85   21.6           23.89   UNKNOWN        SPHERICAL  # PBH53W 
56.7     2         1.81   21             40.91   UNKNOWN        SPHERICAL  # LAH53  
38.8     1.38      1      20.1           0       AIR            SPHERICAL  
47.1     3.8       1.81   20.2           25.43   UNKNOWN        SPHERICAL  # PBH6W  
70.8     81.4      1      19.7           0       AIR            SPHERICAL  
73.6     5.28      1.62   11.3           63.4       OHARA_S_PHM52  SPHERICAL  
-467     1.3       1      10.8           0       AIR            SPHERICAL  
0        1.32      0      10.5           0       AIR            SPHERICAL  
64.7     4.6       1.62   10.6           63.4       OHARA_S_PHM52  SPHERICAL  
281      6.48      1      10.5           0       AIR            SPHERICAL  
-44      2.15      1.8    10.3           46.6    UNKNOWN        SPHERICAL  
-276     0.1       1      10.6           0       AIR            SPHERICAL  
105      11.9      1.44   10.7           95.0       OHARA_S_FPL53  SPHERICAL  
-45.9    0.1       1      11.3           0       AIR            SPHERICAL  
-126     2.2       1.73   11.2           51.57   UNKNOWN        SPHERICAL  # LAL59  
63.2     4.98      1      11.3           0       AIR            SPHERICAL  
1.46e+04 2.25      1.72   12             34.72   UNKNOWN        SPHERICAL  # BPH8   
84.4     9.97      1.6    12.3           65.44   UNKNOWN        SPHERICAL  # PHM53  
-87.1    0.1       1      13.4           0       AIR            SPHERICAL  
88.9     2.55      1.52   13.7           59.84   UNKNOWN        SPHERICAL  # NSL_5  
56.4     14.3      1.44   13.8           95.0       OHARA_S_FPL53  SPHERICAL  
-114     0.1       1      14.7           0       AIR            SPHERICAL  
84       6.82      1.72   14.83           46.02   UNKNOWN        SPHERICAL  # LAM61  
391      0.7       1      14.6           0       AIR            SPHERICAL  
1.4e+03  2.53      1.78   14.5           25.71   UNKNOWN        SPHERICAL  # PBH11W 
-106     0.1       1      14.5           0       AIR            SPHERICAL  
-221     1.8       1.9    14.4           31.55   UNKNOWN        SPHERICAL  # LAH78  
72.1     0.911     1      14.3           0       AIR            SPHERICAL   
129      3.17      1.72   14.3           46.02   UNKNOWN        SPHERICAL  # LAM61  
-118     1.43      1      14.3           0       AIR            SPHERICAL
136      2.44      1.82   14.12           46.6    UNKNOWN        CYLINDER_X # SLAH59 
-177     0.125     1      14.01             0       AIR            CYLINDER_X 
19.2     4.09      1.82   13.22           46.6    UNKNOWN        CYLINDER_X # SLAH59 
18.1     3.77      1      12.84           0       AIR            CYLINDER_X 
-193     1.05      1.67   12.84           47.23   UNKNOWN        CYLINDER_X # SBAH10 
24.4     2.98      1      12.77           0       AIR            CYLINDER_X 
386      1.04      1.82   12.48             46.6    UNKNOWN        CYLINDER_Y # SLAH59 
31.3     0.793     1      12.27           0       AIR            CYLINDER_Y 
35.5     0.978     1.5    12.39           45.79   UNKNOWN        CYLINDER_Y # STLM1  
29.1     2.09      1.85   12.38           23.78   UNKNOWN        CYLINDER_Y # STIH53 
36.2     0.076     1      12.37           0       AIR            CYLINDER_Y 
32.5     5.37      1.79   12.47           47.37   UNKNOWN        CYLINDER_Y # SLAH64 
-182     1.04      1.81   12.45           25.42   UNKNOWN        CYLINDER_Y # STIH6  
262      35.1      1      11.80           0       UNKNOWN        CYLINDER_Y

#[Aspheric Coefficients]
#1:  k=-1.5066 a4=2.0962E-06  a6=-7.9395E-10 a8=6.1324E-13 a10=-2.8537E-16 a12=3.1072E-20
#40: k=-2.2286 a4=2.2871E-06  a6=-2.1575E-9 a8=9.2167E-12 a10=-1.2856E-14
```
@Latios96 Latios96 added the bug Something isn't working label Feb 11, 2025
@Latios96 Latios96 self-assigned this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant