cherab / core

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

Make atomic rates return zero if plasma and/or beam parameters <= 0 #450

Closed vsnever closed 1 month ago

vsnever commented 1 month ago

As suggested in https://github.com/cherab/core/pull/386#discussion_r1602808475, there is no need to set near-zero thresholds for plasma and beam parameters in atomic rates. Instead of this: https://github.com/cherab/core/blob/d033dd1c9f9824715f034cfb64183ad9af158521/cherab/openadas/rates/pec.pyx#L58-L64 atomic rates should return zero if the parameters are less than or equal to zero:

    if density <= 0 or temperature <= 0:
         return 0
vsnever commented 1 month ago

Fixed in #451.