cherab / core

The core source repository for the Cherab project.
https://www.cherab.info
Other
44 stars 24 forks source link

Add 'units' attribute to RayTransferPipelines #412

Closed vsnever closed 1 year ago

vsnever commented 1 year ago

Currently, RayTransferPipeline#D multiplies the calculated matrix by the sensitivity of the detector, which has units of [m2 sr], but is equal to 1 for some non-physical observers (PinholeCamera, VectorCamera, SightLine). This can confuse a user who has switched from SightLine to FibreOptic or from PinholeCamera to CCDArray and expects the ray transfer matrix to still be calculated in [m] but receives it in [m3 sr].

So, I suggest adding an attribute units to RayTransferPipeline#D, which can be either 'power' or 'radiance', similar to the Power and Radiance pipelines. This attribute determines whether the matrix is multiplied by sensitivity ('power') or not ('radiance'). The 'power' option will be used by default, so as not to break user code.

vsnever commented 1 year ago

Completed in #413.