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

2014-05-16 Thread Ernest Bonat, Ph.D.
1. There are a lot of spinet codes in many languages for numerical
integration. I may find a good one in Python for you? try SciPy.org (
http://www.scipy.org/about.html) you may find something there.

2. Look at the wiki too: https://wiki.python.org/moin/NumericAndScientific.

I hope this help a bit!

Ernest Bonat, Ph.D.



On Fri, May 16, 2014 at 10:55 AM, Terry Reedy  wrote:

> On 5/16/2014 4:49 AM, Enlong Liu wrote:
>
>> Dear All,
>>
>> I have a question about the integration with Python.
>>
>
> For numerical integration, you should look as numpy and scipy and perhaps
> associated packages.
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Thanks

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Business Statistics Analyst
Mobile: 503.730.4556
Email: ernest.bo...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread duncan smith

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

--
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread Terry Reedy

On 5/16/2014 4:49 AM, Enlong Liu wrote:

Dear All,

I have a question about the integration with Python.


For numerical integration, you should look as numpy and scipy and 
perhaps associated packages.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread Ernest Bonat, Ph.D.
Hi Enlong

You may try standard numerical integration solutions based on the E and
T(E) columns data provided.

Ernest Bonat, Ph.D.



On Fri, May 16, 2014 at 1:49 AM, 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: liuenlon...@gmail.com; enlong@student.kuleuven.be;
> enlong@biotech.tu-dresden.de
> Mobile Phone: +4917666191322
> Mailing Address: Zi. 0108R, Budapester Straße 24, 01069, Dresden, Germany
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>


-- 
Thanks

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Business Statistics Analyst
Mobile: 503.730.4556
Email: ernest.bo...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread Johannes Schneider
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:liuenlon...@gmail.com ;
enlong@student.kuleuven.be ;
enlong@biotech.tu-dresden.de 
Mobile Phone: +4917666191322
Mailing Address: Zi. 0108R, Budapester Straße 24, 01069, Dresden, Germany






--
Johannes Schneider
Webentwicklung
johannes.schnei...@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
--
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread duncan smith

On 16/05/14 13:57, Enlong Liu wrote:

Sorry for this inconvenience. Since my file is a little large, I think it will 
be more difficult for fellows to check. I will now paste the attachment below.

The file for T(E) consists of two columns, the first is E and the second is 
T(E). What I want is to integrate this function in a certain range.

   E   T(E)
   -6.2578958.96247678929291
   -6.2378958.90487115888237
   -6.2178957.96907432610510


[snip]

http://en.wikipedia.org/wiki/Numerical_integration

Duncan

--
https://mail.python.org/mailman/listinfo/python-list


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

2014-05-16 Thread Enlong Liu
Sorry for this inconvenience. Since my file is a little large, I think it will 
be more difficult for fellows to check. I will now paste the attachment below.

The file for T(E) consists of two columns, the first is E and the second is 
T(E). What I want is to integrate this function in a certain range. 

  E   T(E)   
  -6.2578958.96247678929291 
  -6.2378958.90487115888237 
  -6.2178957.96907432610510 
  -6.1978957.92011229305473 
  -6.1778956.99973958998368 
  -6.1578956.99959200703257 
  -6.1378956.99960349124858 
  -6.1178956.99960255937428 
  -6.0978957.02338574542792 
  -6.0778958.93135475951887 
  -6.0578959.96750726601798 
  -6.03789510.9408732001956 
  -6.01789510.9415058589703 
  -5.9978958.94537541754214 
  -5.97789510.8097100967606 
  -5.9578958.85226193360772 
  -5.9378956.99661653557932 
  -5.9178956.9965473639 
  -5.8978956.99670347299879 
  -5.8778956.99673218445900 
  -5.8578956.99659826270511 
  -5.8378956.99623464091850 
  -5.8178956.99548818932425 
  -5.7978956.99394489936466 
  -5.7778956.99005017803712 
  -5.7578956.96962543581676 
  -5.7378955.99747630590266 
  -5.7178956.94845928621193 
  -5.6978956.98766975985479 
  -5.6778956.97758798116556 
  -5.6578956.95055436382018 
  -5.6378956.87176971154089 
  -5.6178956.54273589313568 
  -5.5978955.86175895258116 
  -5.5778955.9282973331 
  -5.5578954.99981497444712 
  -5.5378954.99980834464660 
  -5.5178954.99980420721252 
  -5.4978954.99979886872216 
  -5.4778954.99978991290910 
  -5.4578954.99977459415969 
  -5.4378954.99974900970110 
  -5.4178954.99970628963861 
  -5.3978954.99963148201658 
  -5.3778954.99948355338835 
  -5.3578954.99911446459881 
  -5.3378954.99695076010531 
  -5.3178954.99843069856951 
  -5.2978954.99936037524651 
  -5.2778956.35475207677864 
  -5.2578956.82856665022716 
  -5.2378956.14018744222317 
  -5.2178956.36919461746248 
  -5.1978956.99756897433419 
  -5.1778956.99744749888663 
  -5.1578956.99680114447542 
  -5.1378956.99567111628791 
  -5.1178956.99382008170924 
  -5.0978956.99072617412210 
  -5.0778956.98523875355823 
  -5.0578956.97440300478140 
  -5.0378956.94799835685808 
  -5.0178956.8329785804 
  -4.9978955.99940020401670 
  -4.9778955.99938810939229 
  -4.9578955.02927710403357 
  -4.9378954.99915975390103 
  -4.9178954.99890278935809 
  -4.8978954.99859914243363 
  -4.8778954.99821739336097 
  -4.8578954.99773235771017 
  -4.8378954.99710904566381 
  -4.8178954.99629369410517 
  -4.7978954.99519763548885 
  -4.7778954.99366188069830 
  -4.7578954.99136763606374 
  -4.7378954.98756326792036 
  -4.7178954.97994414169979 
  -4.6978954.95655109792192 
  -4.6778954.29448749155961 
  -4.6578953.99951693213742 
  -4.6378953.99942050837630 
  -4.6178953.99929275933828 
  -4.5978953.99907888035628 
  -4.5778954.91566360421753 
  -4.5578953.00063522267926 
  -4.5378953.99325633047260 
  -4.5178953.98716883843963 
  -4.4978953.99345892791020 
  -4.4778953.86300434156207 
  -4.4578952.98361846417016 
  -4.4378951.00328787566656 
  -4.417895   0.999797612478520 
  -4.397895   0.999727944291486 
  -4.377895   0.999702219681149 

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

2014-05-16 Thread Dave Angel

On 05/16/2014 04:49 AM, 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?

You posted in html, and you tried to make an attachment.  Either of 
these will stop many people from seeing what you intended them to see.


Presumably the rest of the explanation is in the source code, which you 
didn't include in your message.  This is a text-mailing-list, and many 
of us cannot see attachments, and many others of us cannot see html.


Please tell your email program to use plain text, not html.

Please paste any attachments into the same text message, unless it's too 
big.  In that case, you'd need to paste a link instead, but many people 
won't be able and/or willing to follow such links.



--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list