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

pupil aiming with tilted object #8

Open
MaximilianHoffmann opened this issue Jun 8, 2016 · 8 comments
Open

pupil aiming with tilted object #8

MaximilianHoffmann opened this issue Jun 8, 2016 · 8 comments

Comments

@MaximilianHoffmann
Copy link

s1=ro.system_from_yaml('''!!python/unicode 'description': !!python/unicode 'AC508-200-B AC508-200-B NEAR IR
  ACHROMATS: Infinite Conjugate 200'
!!python/unicode 'elements':
- !!python/unicode 'angles': [0.08726646259971647, 0.0, 0.0]
  !!python/unicode 'material': basic/air
  !!python/unicode 'radius': 0.01401147303517
- {!!python/unicode 'curvature': 0.0019409937888199, !!python/unicode 'distance': 193.14,
  !!python/unicode 'material': SCHOTT/N-SF6HT, !!python/unicode 'radius': 25.4}
- {!!python/unicode 'curvature': 0.0091575091575092, !!python/unicode 'distance': 5.0,
  !!python/unicode 'material': SCHOTT/N-LAK22, !!python/unicode 'radius': 25.4}
- {!!python/unicode 'curvature': -0.0074626865671642, !!python/unicode 'distance': 8.2,
  !!python/unicode 'material': basic/air, !!python/unicode 'radius': 25.4}
- {!!python/unicode 'distance': 100.0, !!python/unicode 'material': basic/air}
- {!!python/unicode 'material': basic/air, !!python/unicode 'radius': 18.0}
- {!!python/unicode 'curvature': 0.0074626865671642, !!python/unicode 'distance': 100.0,
  !!python/unicode 'material': SCHOTT/N-LAK22, !!python/unicode 'radius': 25.4}
- {!!python/unicode 'curvature': -0.0091575091575092, !!python/unicode 'distance': 8.2,
  !!python/unicode 'material': SCHOTT/N-SF6HT, !!python/unicode 'radius': 25.4}
- {!!python/unicode 'curvature': -0.0019409937888199, !!python/unicode 'distance': 5.0,
  !!python/unicode 'material': basic/air, !!python/unicode 'radius': 25.4}
- !!python/unicode 'angles': [-0.08726646259971647, 0.0, 0.0]
  !!python/unicode 'distance': 193.33044385190678
  !!python/unicode 'material': basic/air
  !!python/unicode 'radius': 10.0
!!python/unicode 'image':
  !!python/unicode 'pupil': {!!python/unicode 'distance': -404.3669122413583, !!python/unicode 'radius': 36.37432010274401,
    !!python/unicode 'refractive_index': 1.0002750477973053, !!python/unicode 'update_radius': true}
  !!python/unicode 'radius': 0.01401147303517
  !!python/unicode 'type': !!python/unicode 'finite'
!!python/unicode 'object':
  !!python/unicode 'pupil': {!!python/unicode 'distance': 404.1764683894514, !!python/unicode 'radius': 36.374320102743994,
    !!python/unicode 'refractive_index': 1.0002750477973053, !!python/unicode 'update_radius': true}
  !!python/unicode 'radius': 10.0
  !!python/unicode 'type': !!python/unicode 'finite'
!!python/unicode 'pickups': []
!!python/unicode 'scale': 0.001
!!python/unicode 'solves': []
!!python/unicode 'stop': 5
!!python/unicode 'validators': []
!!python/unicode 'wavelengths': [8.0e-07]''')

ro.Analysis(s1)
@MaximilianHoffmann
Copy link
Author

MaximilianHoffmann commented Jun 8, 2016

The above code tries to evaluate a 4f system from a tilted plane to a tilted plane. Obviously something is wrong here, probably I entered bad parameters. But the stop should be plane 5, although the bundle diameter is still according to the stop, the rays do not pass through it.

The marginal and chief rays seem fine. So there is possible an aiming issue?

@MaximilianHoffmann
Copy link
Author

MaximilianHoffmann commented Jun 8, 2016

Indeed , when

t = ro.GeometricTrace(s1)
t.rays_point((0, 0),stop=5)

is executed for stop=5 the brentq solver in aim_marginal does throw an error. Although a paraxial marginal ray is clearly found.

@jordens
Copy link
Member

jordens commented Jun 9, 2016

Yes. This is incomplete/a bug.
I would have to think a bit how to correctly do a tilted object plane.
Without looking at the code again I think it assumes that it can hit the stop center from an on-axis object point by going straight. But I would have to check again. This assumption is not generally true.
Paraxial calculations assume that things are "aligned".

@jordens
Copy link
Member

jordens commented Jun 9, 2016

Oh and I don't like it sprinkling the !!python/unicode stuff everywhere. Is this Python 2.X?

@MaximilianHoffmann
Copy link
Author

Yes, it is Python 2.X . Are you using new language features? Apart from this, everything seemed to run fine. I guess by dropping all aiming tracing a given set of rays via geometric_ray.propagate(clip=True) will work correctly even for a tilted object plane.

@jordens
Copy link
Member

jordens commented Jun 9, 2016

True. You can always use GeometricTrace.rays_given(y, u) and then propagate(). Initial y and u given in element-normal coordinates.

@jordens jordens changed the title imaging from tilted object to tilted image pupil aiming with tilted object Jun 15, 2016
@MaximilianHoffmann
Copy link
Author

Please, say if you are tired of these discussions. I know much less about these matters and how ray tracing packages usually operate. Wouldn't it be ok to aim from the non tilted plane and tilt the aimed rays with s[0].to_normal(). Of course, this won't satisfy the distribution exactly...
A general question about pupil aiming would be: If one is interested in how well a system images, why can't one just start with rays with a uniform angular distribution.

@jordens
Copy link
Member

jordens commented Jun 16, 2016

You can have other elements offset and tilted on the way from the object to the stop. Therefore you can just as well aim in the fully tilted configuration.

Yes. uniform angular distributions are correct for some cases. But other cases need cos^4 for example. It's very application dependent.

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

No branches or pull requests

2 participants