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

How can we set an arbitrary frequency support for the OTF? #26

Open
npcottaris opened this issue Oct 29, 2014 · 0 comments
Open

How can we set an arbitrary frequency support for the OTF? #26

npcottaris opened this issue Oct 29, 2014 · 0 comments
Labels

Comments

@npcottaris
Copy link
Contributor

The following code

        oi = oiCreate('human', pupilRadiusInMeters);

        % Compute the optical image
        oi = oiCompute(scene,oi); 

        % get the optics
        optics = oiGet(oi, 'optics');

        % set new OTF supports
        optics = opticsSet(optics, 'otffx', [-200:1:199]);
        optics = opticsSet(optics, 'otffy', [-200:1:199]);

        % update the oi struct with the new optics struct
        oi = oiSet(oi, 'optics', optics);

       % recompute oi
(*)    oi = oiCompute(scene,oi);  

        % get the new OTF
        optics = oiGet(oi, 'optics');
        OTF = opticsGet(optics,'otf data');

crashes in the marked (*) line. This can be traced back to line 79 of customOTF(), which tries to interpolate the default OTF to the desired one. The crash happens because the sizes of fx and fy (80x120) (which are related to the optical image size) do not match the size of the default OTF (60x60).

If line (*) above is omitted the returned OTF is the default 60x60x31.

Related to this, shouldn't we compute a new OTF instead of interpolating the 60x60 OTF?

Thanks,
Nicolas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant