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

Separate out the geometry from the functional optics #182

Merged
merged 19 commits into from
Aug 22, 2018

Conversation

hamogu
Copy link
Member

@hamogu hamogu commented Aug 22, 2018

This partially addresses #181

hamogu and others added 19 commits August 22, 2018 11:26
In this commit:
- Get geometry information from ['XXX'] syntax
- Call geometry functions
- Adapt CircularDetector (the only object that used a cylindrical geometry before)
- Modify tests to use forward rays (some tests required rays to go backwards to hit elements)

All but one tests pass at this point, but more work is needed ot make things consistent
and update documentation and comments.
In some cases I just silenced certain warnings (e.g. the ACIS dimensions
are not an integer multiple of the pixel size. That is well known by
the developers but there is no reason to tell a user any time since
they can't really change it), in other cases code was rewritten to
handle edge cases better (e.g. testing for equality of vectors
before deviding them by their cross-product to avoid "devide by 0"
messages).
Replace display dicts with a version that looks up missing items in
geometry. In this way, useful defaults can be taken fomr the geometry
(e.g. the shape) withou actually making a copy of the data (which
risks not being up to date in something is changed in the geometry).

This works for now and is a step forward, but might still evolve further
before the next release, e.g.
- use traitlets to allow default for color
- copy reference to value into display dict, taking away the need to define
  a special class.

These options need to be investigated.
This allows for cylindrical detectors again.
- Global EnergyFilter does not need a Geometry
- Defaults for plotting surface mesh for Cylinder were wrong
FlatGrating should not work with different geometries, not just a flat plane.
@hamogu
Copy link
Member Author

hamogu commented Aug 22, 2018

This code is not complete in the sense that not all objects are fully supported in the new geometry scheme. However, I'll get ready to merge it at this point. Separate issues and PRs can be used to finish this. At this point, I;d rather get this branch in line with master again so that I can adapt my Arcus code for it.

@hamogu hamogu merged commit 4522929 into Chandra-MARX:master Aug 22, 2018
hamogu added a commit that referenced this pull request Aug 22, 2018
@hamogu hamogu deleted the separategeom2 branch August 22, 2018 21:32
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

Successfully merging this pull request may close these issues.

1 participant