Evaluate derivative of E^2 times differential flux with
        respect to E.
421392
def e2dnde_deriv(self, x, params=None):
        """"""
        params = self.params if params is None else params
        return np.squeeze(self.eval_e2dnde_deriv(x, params, self.scale,
                                                 self.extra_params))
922654
def flux(self, emin, emax, params=None):
        """"""
        params = self.params if params is None else params
        return np.squeeze(self.eval_flux(emin, emax, params, self.scale,
                                         self.extra_params))
366856
def _deriv_logaddexp2(x1, x2):
    """"""
    y1 = np.exp2(x1)
    y2 = np.exp2(x2)
    df_dx1 = y1 / (y1 + y2)
    df_dx2 = y2 / (y1 + y2)
    return np.vstack([df_dx1, df_dx2]).T
238305
def derivative(self, z, x, y, fase):
        """"""
        return deriv_G(self, z, x, y, fase)
1336325
def _mdens_deriv(self,m):
        """"""
        return -self.a3*(self.a+3.*m)/m**2/(self.a+m)**3
845145
def _total_flux(self, r_eff, I_eff, n_sersic):
        
        bn = self.b_n(n_sersic)
        return I_eff * r_eff**2 * 2 * np.pi * n_sersic * np.exp(bn) / bn**(2*n_sersic) * scipy.special.gamma(2*n_sersic)
163944
def derivatives(self, x, y, amp, sigma_x, sigma_y, center_x=0, center_y=0):
        
        f_ = self.function(x, y, amp, sigma_x, sigma_y, center_x, center_y)
        return f_ * (center_x-x)/sigma_x**2, f_ * (center_y-y)/sigma_y**2
128702
def fRD( a, M):
    """"""
    f = (lal.C_SI**3.0 / (2.0*lal.PI*lal.G_SI*M*lal.MSUN_SI)) * (1.5251 - 1.1568*(1.0-a)**0.1292)
    return f
428645
def ednde_deriv(self, x, params=None):
        """"""
        params = self.params if params is None else params
        return np.squeeze(self.eval_ednde_deriv(x, params, self.scale,
                                                self.extra_params))
747232
def _deriv_hypot(x, y):
    """"""
    r = np.hypot(x, y)
    df_dx = x / r
    df_dy = y / r
    return np.hstack([df_dx, df_dy])
821214
def evaluate(self, x, *args):
        
        a = (self.amplitude * np.ones_like(x)) * self._flux_unit
        y = units.convert_flux(x, a, units.PHOTLAM)
        return y.value
633919
def _flux(t, n, duration, std, offs=1):
    '''
    
    '''
    duration *= len(t) / t[-1]
    duration = int(max(duration, 1))

    pos = []
    n *= t[-1]
    pp = np.arange(len(t))
    valid = np.ones_like(t, dtype=bool)
    for _ in range(int(round(n))):
        try:
            ppp = np.random.choice(pp[valid], 1)[0]
            pos.append(ppp)
            valid[max(0, ppp - duration - 1):ppp + duration + 1] = False
        except ValueError:
            break
    sign = np.random.randint(0, 2, len(pos))
    sign[sign == 0] = -1

    out = np.zeros_like(t)

    amps = np.random.normal(loc=0, scale=1, size=len(pos))

    if duration > 2:
        evt = gaussian(duration, duration)
        evt -= evt[0]
    else:
        evt = np.ones(shape=duration)


    for s, p, a in zip(sign, pos, amps):
        pp = duration
        if p + duration > len(out):
            pp = len(out) - p

        out[p:p + pp] = s * a * evt[:pp]

    out /= out.std() / std
    out += offs
    return out
764295
def obfn_dfd(self):
        
        """

        Ef = self.eval_Rf(self.Xf)
        return sl.rfl2norm2(Ef, self.S.shape, axis=self.cri.axisN) / 2.0
409877
def derivatives(self, x, y, kappa_ext, ra_0=0, dec_0=0):
        
        x_ = x - ra_0
        y_ = y - dec_0
        f_x = kappa_ext * x_
        f_y = kappa_ext * y_
        return f_x, f_y
44087
def derivative(self, t, n=1):
        """"""
        angle = radians(self.theta + t*self.delta)
        phi = radians(self.rotation)
        rx = self.radius.real
        ry = self.radius.imag
        k = (self.delta*2*pi/360)**n  # ((d/dt)angle)**n

        if n % 4 == 0 and n > 0:
            return rx*cos(phi)*cos(angle) - ry*sin(phi)*sin(angle) + 1j*(
                rx*sin(phi)*cos(angle) + ry*cos(phi)*sin(angle))
        elif n % 4 == 1:
            return k*(-rx*cos(phi)*sin(angle) - ry*sin(phi)*cos(angle) + 1j*(
                -rx*sin(phi)*sin(angle) + ry*cos(phi)*cos(angle)))
        elif n % 4 == 2:
            return k*(-rx*cos(phi)*cos(angle) + ry*sin(phi)*sin(angle) + 1j*(
                -rx*sin(phi)*cos(angle) - ry*cos(phi)*sin(angle)))
        elif n % 4 == 3:
            return k*(rx*cos(phi)*sin(angle) + ry*sin(phi)*cos(angle) + 1j*(
                rx*sin(phi)*sin(angle) - ry*cos(phi)*cos(angle)))
        else:
            raise ValueError("n should be a positive integer.")
759924
def get_flux(self, reaction):
        """"""
        return self._prob.result.get_value(self._v(reaction))
412671
def derivative(self, t=None, n=1):
        """"""
        assert self.end != self.start
        if n == 1:
            return self.end - self.start
        elif n > 1:
            return 0
        else:
            raise ValueError("n should be a positive integer.")