Did I find the right examples for you? yes no

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/p/y/pyradex-0.2/pyradex/despotic_interface.py   pyradex(Download)
import os
from collections import defaultdict
from .utils import united,uvalue
    def deltav(self):
            return united(self._dv,u.km/u.s)
        except u.UnitsError:
            return united(self._dv,u.km/u.s/u.pc)
    def deltav(self, deltav):
        if self.escapeProbGeom == 'LVG':
            self._dv = united(self.cloud.dVdr,u.s**-1)
            # See notes.rst: DESPOTIC must have a different dVdR to get the same results as RADEX
            # 1.0645 / sqrt(8*log(2)) = sqrt(2 * pi) / (8*log(2))
            self.cloud.dVdr = uvalue(united(deltav,u.km/u.s/u.pc),u.s**-1) * np.sqrt(8*np.log(2)) * 2