raysect / source

The main source repository for the Raysect project.
http://www.raysect.org
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Fast emitters and integrators for regular grids #343

Open vsnever opened 4 years ago

vsnever commented 4 years ago

This is a draft pull request for fast emitters and integrators that work with regular grids, It was originally proposed for Cherab (issue #204) but, as @CnlPepper suggested, these emitters and integrators are more suitable for Raysect.

I tried to address all the issues raised in the discussion.

The emitters work as follows:

Currently, building the cache is slow, and it's noticeable for large grids. I'll try to optimise it in the future.

This draft pull request contains 4 demos. The first one is a kind of tutorial. The code has built-in documentation but I didn't update the .rst files yet. Please look through the code, and if it's OK in general, I'll update the documentation and make this PR ready for review.

Also, I have a question to @CnlPepper. The SpectralFunction has custom __getstate__(), __setstate__(), __reduce__() methods. Do I need them in RegularGridEmitter too?

vsnever commented 3 years ago

I updated the documentation for the API and demonstrations. Regarding the __getstate__() and __setstate__() methods, I think these are not necessary in the material class.