brandondube / prysm

physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing...
https://prysm.readthedocs.io/en/stable/
MIT License
262 stars 45 forks source link

Smear FT error at angle 0 #100

Closed nora-anne closed 1 year ago

nora-anne commented 1 year ago

If passing an angle of 0 to the smear_ft function in degredations, it will attempt to return a variable that has not been defined because it is defined inside the if statement.

My current fix locally is to just remove lines 29 and 31 from the if statement, but that appears to be an unnecessary calculation at that point. so it might make more sense just to have two return statements inside if/elif statements or similar.

nora-anne commented 1 year ago

Closing as I see this has already been updated in a newer version of code.