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

Extracting OTF data from optical image objects #25

Open
npcottaris opened this issue Oct 27, 2014 · 5 comments
Open

Extracting OTF data from optical image objects #25

npcottaris opened this issue Oct 27, 2014 · 5 comments

Comments

@npcottaris
Copy link
Contributor

Currently, to get the OTF data associated with an optical image object, we must call plotOI, which also plots the OTF in addition to returning the data. I believe there is no other way, but I could be wrong. If this is indeed the case, we should probably add oiGet(oi, 'otf data'), which will compute the OTF function and return it without any plotting. Objections, suggestions?

@hjiang36
Copy link
Contributor

Maybe you can try oiGet(oi, 'optics otf data'). Not sure if this is what
you want.
Also, you can have a look at oiCalculateOTF function.

Best,
HJ

On Mon, Oct 27, 2014 at 11:19 AM, Nicolas Cottaris <[email protected]

wrote:

Currently, to get the OTF data associated with an optical image object, we
must call plotOI, which also plots the OTF in addition to returning the
data. I believe there is no other way, but I could be wrong. If this is
indeed the case, we should probably add oiGet(oi, 'otf data'), which will
compute the OTF function and return it without any plotting. Objections,
suggestions?


Reply to this email directly or view it on GitHub
isetbio/isetbio#25.

@npcottaris
Copy link
Contributor Author

Hi HJ,

I tried that. It bombs out for ‘diffraction limited’ optics such as a diffuser.

Nicolas

Error using opticsGet (line 479)
format is ... oi, spatialUnits,wave

Error in oiGet (line 135)
elseif isempty(varargin), val = opticsGet(optics,parm);

Error in validateDiffuser>validationScript (line 39)
otfdata = oiGet(oi, 'optics otf data')

On Oct 27, 2014, at 2:35 PM, Haomiao Jiang [email protected] wrote:

Maybe you can try oiGet(oi, 'optics otf data'). Not sure if this is what
you want.
Also, you can have a look at oiCalculateOTF function.

Best,
HJ

On Mon, Oct 27, 2014 at 11:19 AM, Nicolas Cottaris <[email protected]

wrote:

Currently, to get the OTF data associated with an optical image object, we
must call plotOI, which also plots the OTF in addition to returning the
data. I believe there is no other way, but I could be wrong. If this is
indeed the case, we should probably add oiGet(oi, 'otf data'), which will
compute the OTF function and return it without any plotting. Objections,
suggestions?


Reply to this email directly or view it on GitHub
isetbio/isetbio#25.


Reply to this email directly or view it on GitHub isetbio/isetbio#25 (comment).

@hjiang36
Copy link
Contributor

Hi,

I'm not sure what command you ran, but here are some points that might

be helpful.
1) Diffraction limited lens is not widely used for human case. Maybe
you could try oiCreate('human') to create one. That one is based one model
shift-invariant and everything mentioned above should work.
2) For diffraction limited (and also other lens), there is not
wavelength specified in oiCreate. Also, if there is no scene, the program
can just use some arbitrary spatial support to compute otf. To make it work
for diffraction limited lens (not human case), try code below:
oi = oiCreate; oi = oiSet(oi, 'wave', 400:10:700); otf = oiGet(oi,
'otf data', oi);

Best,
HJ

On Mon, Oct 27, 2014 at 11:40 AM, Nicolas Cottaris <[email protected]

wrote:

Hi HJ,

I tried that. It bombs out for ‘diffraction limited’ optics such as a
diffuser.

Nicolas

Error using opticsGet (line 479)
format is ... oi, spatialUnits,wave

Error in oiGet (line 135)
elseif isempty(varargin), val = opticsGet(optics,parm);

Error in validateDiffuser>validationScript (line 39)
otfdata = oiGet(oi, 'optics otf data')

On Oct 27, 2014, at 2:35 PM, Haomiao Jiang [email protected]
wrote:

Maybe you can try oiGet(oi, 'optics otf data'). Not sure if this is what
you want.
Also, you can have a look at oiCalculateOTF function.

Best,
HJ

On Mon, Oct 27, 2014 at 11:19 AM, Nicolas Cottaris <
[email protected]

wrote:

Currently, to get the OTF data associated with an optical image
object, we
must call plotOI, which also plots the OTF in addition to returning
the
data. I believe there is no other way, but I could be wrong. If this
is
indeed the case, we should probably add oiGet(oi, 'otf data'), which
will
compute the OTF function and return it without any plotting.
Objections,
suggestions?


Reply to this email directly or view it on GitHub
isetbio/isetbio#25.


Reply to this email directly or view it on GitHub <
https://github.com/isetbio/isetbio/issues/25#issuecomment-60646182>.


Reply to this email directly or view it on GitHub
isetbio/isetbio#25 (comment).

@npcottaris
Copy link
Contributor Author

Hi,

oi = oiSet(oi, 'wave', 400:10:700)

was the missing ingredient.

Thanks,
Nicolas

On Oct 27, 2014, at 3:01 PM, Haomiao Jiang [email protected] wrote:

Hi,

I'm not sure what command you ran, but here are some points that might
be helpful.

  1. Diffraction limited lens is not widely used for human case. Maybe
    you could try oiCreate('human') to create one. That one is based one model
    shift-invariant and everything mentioned above should work.
  2. For diffraction limited (and also other lens), there is not
    wavelength specified in oiCreate. Also, if there is no scene, the program
    can just use some arbitrary spatial support to compute otf. To make it work
    for diffraction limited lens (not human case), try code below:
    oi = oiCreate; oi = oiSet(oi, 'wave', 400:10:700); otf = oiGet(oi,
    'otf data', oi);

Best,
HJ

On Mon, Oct 27, 2014 at 11:40 AM, Nicolas Cottaris <[email protected]

wrote:

Hi HJ,

I tried that. It bombs out for ‘diffraction limited’ optics such as a
diffuser.

Nicolas

Error using opticsGet (line 479)
format is ... oi, spatialUnits,wave

Error in oiGet (line 135)
elseif isempty(varargin), val = opticsGet(optics,parm);

Error in validateDiffuser>validationScript (line 39)
otfdata = oiGet(oi, 'optics otf data')

On Oct 27, 2014, at 2:35 PM, Haomiao Jiang [email protected]
wrote:

Maybe you can try oiGet(oi, 'optics otf data'). Not sure if this is what
you want.
Also, you can have a look at oiCalculateOTF function.

Best,
HJ

On Mon, Oct 27, 2014 at 11:19 AM, Nicolas Cottaris <
[email protected]

wrote:

Currently, to get the OTF data associated with an optical image
object, we
must call plotOI, which also plots the OTF in addition to returning
the
data. I believe there is no other way, but I could be wrong. If this
is
indeed the case, we should probably add oiGet(oi, 'otf data'), which
will
compute the OTF function and return it without any plotting.
Objections,
suggestions?


Reply to this email directly or view it on GitHub
isetbio/isetbio#25.


Reply to this email directly or view it on GitHub <
https://github.com/isetbio/isetbio/issues/25#issuecomment-60646182>.


Reply to this email directly or view it on GitHub
isetbio/isetbio#25 (comment).


Reply to this email directly or view it on GitHub isetbio/isetbio#25 (comment).

@wandell
Copy link
Contributor

wandell commented Oct 28, 2014

Good. We plan to change the default on oiCreate() to add the spectrum field. Currently, it is omitted. If we insert it, we believe that your oiSet() will not be needed.

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

No branches or pull requests

3 participants