Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71664 > unrolled thread

Re: The possibility integration in Python without an equation, just an array-like file

Started byJohannes Schneider <johannes.schneider@galileo-press.de>
First post2014-05-16 17:01 +0200
Last post2014-05-16 19:01 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: The possibility integration in Python without an equation, just an array-like file Johannes Schneider <johannes.schneider@galileo-press.de> - 2014-05-16 17:01 +0200
    Re: The possibility integration in Python without an equation, just an array-like file duncan smith <buzzard@invalid.invalid> - 2014-05-16 19:01 +0100

#71664 — Re: The possibility integration in Python without an equation, just an array-like file

FromJohannes Schneider <johannes.schneider@galileo-press.de>
Date2014-05-16 17:01 +0200
SubjectRe: The possibility integration in Python without an equation, just an array-like file
Message-ID<mailman.10070.1400254020.18130.python-list@python.org>
If you do not have a closed form for T(E) you cannot calculate the exact 
value of I(V).

Anyway. Assuming T is integrable you can approximate I(V).

1. Way to do:
interpolate T(E) by a polynomial P and integrate P. For this you need 
the equation (coefficients and exponents) of P. Integrating is easy 
after that.

2. other way:
Use Stair-functions: you can approximate the Value of IV() by the sum 
over T(E_i) * (E_{i+1} - E_i) s.t. E_0 = E_F-\frac{eV}{2} and E_n = 
E_F+\frac{eV}{2}.


3 one more way:
use a computer algebra system like sage.

bg,
Johannes

On 16.05.2014 10:49, Enlong Liu wrote:
> Dear All,
>
> I have a question about the integration with Python. The equation is as
> below:
> and I want to get values of I with respect of V. E_F is known. But for
> T(E), I don't have explicit equation, but a .dat file containing
> two columns, the first is E, and the second is T(E). It is also in the
> attachment for reference. So is it possible to do integration in Python?
>
> Thanks a lot for your help!
>
> Best regards,
> ​
>
> --
> Faculty of Engineering@K.U. Leuven
> BIOTECH@TU Dresden
> Email:liuenlong20@gmail.com <mailto:liuenlong20@gmail.com>;
> enlong.liu@student.kuleuven.be <mailto:enlong.liu@student.kuleuven.be>;
> enlong.liu@biotech.tu-dresden.de <mailto:enlong.liu@biotech.tu-dresden.de>
> Mobile Phone: +4917666191322
> Mailing Address: Zi. 0108R, Budapester Straße 24, 01069, Dresden, Germany
>
>



-- 
Johannes Schneider
Webentwicklung
johannes.schneider@galileo-press.de
Tel.: +49.228.42150.xxx

Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn - Germany
Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax)
http://www.galileo-press.de/

Geschäftsführer: Tomas Wehren, Ralf Kaulisch, Rainer Kaltenecker
HRB 8363 Amtsgericht Bonn

[toc] | [next] | [standalone]


#71667

Fromduncan smith <buzzard@invalid.invalid>
Date2014-05-16 19:01 +0100
Message-ID<53765276$0$1349$862e30e2@ngroups.net>
In reply to#71664
On 16/05/14 16:01, Johannes Schneider wrote:
> If you do not have a closed form for T(E) you cannot calculate the exact
> value of I(V).
>
> Anyway. Assuming T is integrable you can approximate I(V).
>
> 1. Way to do:
> interpolate T(E) by a polynomial P and integrate P. For this you need
> the equation (coefficients and exponents) of P. Integrating is easy
> after that.
>
> 2. other way:
> Use Stair-functions: you can approximate the Value of IV() by the sum
> over T(E_i) * (E_{i+1} - E_i) s.t. E_0 = E_F-\frac{eV}{2} and E_n =
> E_F+\frac{eV}{2}.
>

snip]

Or piecewise polynomials (splines).

Duncan

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web