ISET / iset3d-v3

LEGACY: Replaced by iset3d (v4) -- Read a PBRT file. Edit the parameters. Render an ISET scene or optical image.
MIT License
36 stars 8 forks source link

Routine calculateMTFFromSlantedBar missing #20

Closed DavidBrainard closed 5 years ago

DavidBrainard commented 5 years ago

t_slantedBarMTF crashes out because it calls non-existent routine calculateMTFFromSlantedBar. This routine might exist in iset, but it isn't there when I configure with isetbio.

wandell commented 5 years ago

This looks like a situation that we should sort out together.

@tlian7 uses the slanted bar MTF calculation, which is implemented in ISETCam. The technique is not obviously the right one to use for ISETBio generally because of the inhomogeneous cone photoreceptor arrays. Still, when we use mosaics that are on a grid, the MTF calculations do make sense. I omitted the slanted bar calculations at first.

@tlian7 created a repository, isetlens-eye, that includes the calculateMTFXXXX function. It is not normally on the ISETBio path, but she must be on her path. Perhaps we should remove the tutorial t_snantedBarMTF from ISETBio and put it in her repository. If you have isetlens-eye on your path, you will also have ISETBio, and things will be fine.

Another possibility is that we want to keep the slanted bar MTF calculations in ISETBio, moving other functions from ISETCam. To make sure they work correctly for non-uniform mosaics, however, we would have to do a significant amount of work.

tlian7 commented 5 years ago

Hi everyone,

This was my mistake, calculateSlantedBarMTF is a function from isetlens-eye that runs ISO1223 on the optical image (so it works for both isetbio and isetcam). The t_slantedBarMTF script uses calculateSlantedBarMTF with a comment that it’s in isetlens-eye, and follows it with a replacement implementation that’s commented out. To fix this all we need to do is uncomment that replacement section and remove the function.

I can do this a bit later today.

DavidBrainard commented 5 years ago

Happy to leave to your judgment about how to fix. I am also happy to add isetlens-eye as a dependency to iset3d. Easy for me to do if that is the right approach, but in that case it should be documented on the wiki as such. Or one could do a check in the tutorial as to whether calculateSlantedBarMTF is on the path and run the local code only if it isn't.

tlian7 commented 5 years ago

Fixed.