Chandra-MARX / marxs

Multi-Architecture-Raytrace-Xraymission-Simulator
http://marxs.readthedocs.io/en/latest/
GNU General Public License v3.0
6 stars 9 forks source link

Clean up design.rowland #113

Open hamogu opened 7 years ago

hamogu commented 7 years ago

It sees that there are two 1-D and 2 2D structures with arbitrary inheritance hirachy. That can be simplified before a release.

hamogu commented 7 years ago

I've just run into a problem that resulted from the fact that the GratingArrayStructure has a default normal_spec. However, it's not as one might expect for the grating structure [0,0,0,1] which would be appropriate for rays focussed to the centre, instead, it's derived from the parent class, where it is set for to rowland_normal. Setting it normal to the Rowland circle makes sense for e.g. CCD detectors on the Rowland circle but not for gratings. I think this needs to be resolved to make the defaults sensible. Either I could change it in GratingArrayStructure, but maybe it would be easier to not have a hierarchy, but mostly independent classes with different use cases. The functions "place_on_radius" etc could be part of a mixin class if I want to avoid copy and pasting them.

hamogu commented 2 years ago

Those classes also have very different test coverage, from non-exitant to pretty good.