[SciPy-Dev] Draft Proposal

Jennifer Janani jenny.stone125 at gmail.com
Wed Mar 12 14:53:06 EDT 2014


Sorry for creating a new thread. Changed the mail settings now, it shall
not repeat.


On Tue, Mar 11, 2014 at 4:16 AM, Stéfan van der Walt <stefan at sun.ac.za>wrote:
Hi Jennifer

On Mon, Mar 10, 2014 at 10:29 PM, Jennifer Janani
<jenny.stone125 at gmail.com> wrote:
>>2.1.Improving spherical harmonic functions:
>>
>> The function for spherical harmonic function, sph_harm at present calls
lpmn thus evaluating all orders <N. On the other hand, lpmv >>avoids the
storage of values small N's by using recursion.

>Do you know how one would approach this?  What are the trade-offs to
>the current approach?


Thanks a lot for bringing this up. As we know, the present algorithm
calculate lpmn for all degrees and orders less than n and m, this roughly
means m*n overhead calculations (O(mn)), further there is also the storage
of all these m*n values in the form of 2d array which can be avoided quite
easily.
However, the (15) recurrence relation in section 3.2 (pg 4) of
arxiv.org/pdf/1202.6522v3.pdf<http://bl-1.com/click/load/UWQPOFIyW2pQMgBgAzE-b0231>
and also the 2 formula under the section recurrence formula in
http://en.wikipedia.org/wiki/Associated_Legendre_polynomials<http://bl-1.com/click/load/BDFeaQBgUGEAYlU1UGM-b0231>,
would reduce the number of recurrences drastically from O(mn) to
O(m+n).
Further, another shot can be tried at the formula given in
http://keisan.casio.com/exec/system/1180573409<http://bl-1.com/click/load/VmNeaVAwVmdSMFU1AjI-b0231>(type
A), though I don't quite expect it to be faster than the current
implementation because the implementation of 2F1 too heavily uses
recurrence.


>GSoC proposals usually also include a reference to any PRs you might
>have made to the project so far

I was fortunate enough to make a PR to the org, though it was a trivial one.
https://github.com/numpy/numpy/pull/4234<http://bl-1.com/click/load/VmMMO109U2JTMV09V2Y-b0231>
Thanks for the heads-up, shall be sure to mention it in the proposal.
Further suggestions and constructive criticisms and welcome.
Regards


On Tue, Mar 11, 2014 at 1:59 AM, Jennifer Janani
<jenny.stone125 at gmail.com>wrote:

> Here is a draft proposal, suggestions are really welcome. I would like to
> thank everyone especially Ralf and Pauli for guiding me till here.
>
>
>
>  This is P.S.Janani (Jennifer), a undergraduate student, majoring in
> Computer Science (2nd Year). A self found love for python and high level
> math college courses naturally made me an ardent user of SciPy/NumPy.
> Beyond this I have had formal C course for past 3 years, so I am
> comfortable with that language too. I am comparitively new to open
> sourcing, and after few collaborrated projects at college level
> (PyCoursesync, Helios), SciPy is the first formal organization I have tried
> contibuting to.
>
> I am genuinely interested in contributing to SciPy this summer,
> particularly to scipy.special
>
> The tentative areas of work shall be: Gaussian Hypergeometric Functions
> (2F1) and Spherical Harmonic Functions.
>
> 1. *Gaussian Hypergeometric functions:*
>
> The implementation of the hypergeometric functions in scipy.special is
> lacking in several respects, and is not optimal in many parameter regimes. Gaussian
> hypergeometric function being the most frequently used of hypergeometric
> functions, focus shall be to seal the present loop holes.
>
> 1.1.*Handling the errors that arise when one or more of a,b,c is large:*
>
> Here, We shall aim to overcome the lack of accuracy that occurs when
> attempting to compute the Gauss hypergeometric function when one or more of
> the values of |Re(a)|, |Re(b)| and |Re(c)| is large. At present
> inaccuracies have been sighted at these parametric domains.
>
> The possible approaches to overcome this can be the following:
>
> 1.To develop the present hyp2f1ra and expand the recurrence relation
> method according to the table given in Pg 52 of
> http://people.maths.ox.ac.uk/porterm/research/pearson_final.pdf<http://bl-1.com/click/load/VmMBNlQyBzYAZ1w5U2Q-b0231>(cross reference
> http://www.ams.org/journals/mcom/2007-76-259/S0025-5718-07-01918-7/<http://bl-1.com/click/load/XWhdalYwAjMDZFUwCDw-b0231>
> ).
>
> 2.To <http://bl-1.com/click/load/AzYOOQZgVGUCZV04VWA-b0231> increase the
> sensitivity of hys2f1 by decreasing the error tolerance, however this is
> heavy process and to be avoided.
>
> *1.**2.**Extending Gaussian Hypergeometric functions for complex a,b,c:*
>
> At present SciPy's hyp2f1(a,b,c,z) entertains only z as complex, and not
> a,b or c. The function is to be expanded to include complex inputs too,
> with the domains of the parameters wide and accurate.
>
> *1.**3.Sealing the unexpected and yet-unrecognized loopholes of hyp2f1: *
>
> Almost all possible combinations of a,b,c,z (real and complex) have been
> mentioned in Abramowitz and Stegan (
> http://people.math.sfu.ca/~cbm/aands/page_560.htm<http://bl-1.com/click/load/U2YPOAdhADEFYlcyBDY-b0231>)
> and . A testing on all the mentioned cases may be considered as a thorough
> testing and also the many issues that have been reported scipy shall be
> attempted to be resolved.
>
>
>  *2.Harmonic Functions:*
>
> *2.1.Improving spherical harmonic functions:*
>
> The function for spherical harmonic function, sph_harm at present calls
> lpmn thus evaluating all orders <N. On the other hand, lpmv avoids the
> storage of values small N's by using recursion. Therefore an attempt can
> be made to avoid the overheads by directly evaluating the function for
> given degree and order.
>
> *2.2. Implementing ellipsoidal harmonic functions:*
>
> Further, we can introduce ellipsoidal harmonic functions. The thesis on O
> pen-source
>
> implementations of ellipsoidal harmonics (
> http://arxiv.org/pdf/1204.0267v2.pdf<http://bl-1.com/click/load/BDEIP1I0UGFTNFQxCTo-b0231>),
> presents implementations of ellipsoidal harmonic expansions for solving
> problems of potential theory using separation of variables
>
>
>  *TENTATIVE TIMELINE:*
>
> The project is for the span of 90 days ie approx 12 weeks = 480 hrs.
>
> Considering that it would be a bit slow in the starting, it would be most
> probably in clean synchronization, with sub-proposal 1 ending almost during
> mid-term evaluations. And the second part can be done post mid term
> evaluations. The second half may be a bit busy with me new semester
> beginning by August 1st.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140313/806dab2c/attachment.html>


More information about the SciPy-Dev mailing list