Cheers,
Brian
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>
>
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgra...@calpoly.edu
elli...@gmail.com
Yes. Lance, would you have time to start it? We will help with any
technical issues that you might hit. You can take this code from Sage:
http://trac.sagemath.org/sage_trac/ticket/5996
I got a permission from the author to relicense his code as BSD and
use it in SymPy.
(If you go this route, let me know, I'll ask him and all the people
who changed his patch again, just to make sure all is fine.)
Ondrej
This would be great to have in sympy!
Cheers,
Brian
> Ondrej
Aaron Meurer
Ondrej,
I am willing to help out in this capacity. Even if we just put this
stuff in a branch for now, we can pick away at integrating it with
sympy over time. Can you clear up the license questions?
Cheers,
Brian
> Ondrej
Ok, I'll go ahead and do it.
Yes, I agree, we just need to get started.
I'll keep you informed how it goes.
Ondrej
Cool. We already got permission from all people involved with the
Sage's implementation, you can follow the progress here:
http://groups.google.com/group/sage-devel/browse_thread/thread/33835976efbb3b7f
The last one is Jens, who I already got a permission in a private
email about a year ago, but let's wait to get it again, just to make
sure.
So we can compare which one is better.
Ondrej
We just got the permission from Jens as well (above). So feel free to
take the wigner.py and start adapting it for sympy.
Ondrej
On Fri, Jul 16, 2010 at 6:26 AM, spc93 <steve.c...@gmail.com> wrote:
> Hi,
> This is all I did. I kept as much of the original code as possible. No
> guarantees but it seemed to work for the cases I tested it for. It is
> basically identical to the original Numpy version from Michael
> DePalatis except that it uses Sympy and I removed a parameter that
> determines the number if terms to include in the calculation, which
> did not seem to be necessary. And I added a warning for unphysical
> values.
Thanks for the code. I think that in the long term, it'd be cool to
have the code from Sage, because it was written by the author of the
article about evaluating the coefficients. Also it implements also 3j
and 6j symbols.
I have started porting it, the basic Clebsches seem to work fine now:
http://github.com/certik/sympy/tree/wigner
Can someone please review it? The rest of the things (3j, 6s symbols)
are not tested yet and probably don't work, but Clebsches work and we
can improve this later. Important is to get started. So I think it's
ready to go in, if you agree. All tests pass.
Ondrej
Hi Steve,
Thanks for the code. I think that in the long term, it'd be cool to
On Fri, Jul 16, 2010 at 6:26 AM, spc93 <steve.c...@gmail.com> wrote:
> Hi,
> This is all I did. I kept as much of the original code as possible. No
> guarantees but it seemed to work for the cases I tested it for. It is
> basically identical to the original Numpy version from Michael
> DePalatis except that it uses Sympy and I removed a parameter that
> determines the number if terms to include in the calculation, which
> did not seem to be necessary. And I added a warning for unphysical
> values.
have the code from Sage, because it was written by the author of the
article about evaluating the coefficients. Also it implements also 3j
and 6j symbols.
I have started porting it, the basic Clebsches seem to work fine now:
http://github.com/certik/sympy/tree/wigner
Can someone please review it? The rest of the things (3j, 6s symbols)
are not tested yet and probably don't work, but Clebsches work and we
can improve this later. Important is to get started. So I think it's
ready to go in, if you agree. All tests pass.
Ondrej
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
I took the latest version from Sage hg. Are there some patches that I
am missing?
> * Let's put a note at the top about which functions have been tested/ported
> and which have not.
The problem is that there are not many tests. So I consider ported
only those functions, that have been fully tested. Which means none at
the moment. As you can see here:
http://github.com/certik/sympy/blob/wigner/sympy/physics/tests/test_clebsch_gordan.py#L4
All the numbers from wikipedia should be tested. And that's just
Clebsch Gordan coefficients.
> * In the module level docstring, let's add a comment about this coming from
> Sage with permission to be relicensed.
It's already there:
http://github.com/certik/sympy/blob/wigner/sympy/physics/wigner.py#L18
or do you mean to improve it somehow?
> * Should be update the docstrings/doctests for the ported functions? We can
> also do this later. I don't want to delay this getting in.
We should definitely port the docstrings. I'll try to do some tonight.
> * Does sage have a test suite for this module? If so, should we bring it
> over as well? If not we can just port their doctests.
> Other than this, it looks good and I would merge.
I didn't find any. If they do, we absolutely need that.
I think that Sage only uses doctests, which in many cases (like this)
I find insufficient. They have a "TESTS" section, which I think
doesn't show up in the documentation, but still I think it's better to
test all Clebsches in a separate file. We should test all of them from
wikipedia, to make sure we got all the corner cases right.
Ondrej
> * Let's put a note at the top about which functions have been tested/portedThe problem is that there are not many tests. So I consider ported
> and which have not.
only those functions, that have been fully tested. Which means none at
the moment. As you can see here:
http://github.com/certik/sympy/blob/wigner/sympy/physics/tests/test_clebsch_gordan.py#L4
All the numbers from wikipedia should be tested. And that's just
Clebsch Gordan coefficients.
> * In the module level docstring, let's add a comment about this coming fromIt's already there:
> Sage with permission to be relicensed.
http://github.com/certik/sympy/blob/wigner/sympy/physics/wigner.py#L18
or do you mean to improve it somehow?
> * Should be update the docstrings/doctests for the ported functions? We canWe should definitely port the docstrings. I'll try to do some tonight.
> also do this later. I don't want to delay this getting in.
> * Does sage have a test suite for this module? If so, should we bring itI didn't find any. If they do, we absolutely need that.
> over as well? If not we can just port their doctests.
> Other than this, it looks good and I would merge.
I think that Sage only uses doctests, which in many cases (like this)
I find insufficient. They have a "TESTS" section, which I think
doesn't show up in the documentation, but still I think it's better to
test all Clebsches in a separate file. We should test all of them from
wikipedia, to make sure we got all the corner cases right.
Ondrej
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
On Wed, Jul 28, 2010 at 6:46 AM, klmn <kklem...@cells.es> wrote:
> Dear all,
>
> I need Gaunt coefficients (see the neighboring thread) and I have also
> started from the code wigner.py. Although Jens cites his paper there,
> he doesn’t use it. The paper is about storing the coefficients (and
> this is not implemented) and the calculation itself follows another
> paper.
>
> After I will have solved the simplification problem which hold also
> for you guys who need CG and 3j, I will try to implement two storing
> schemes: one from Rasch&Yu and one from Pinchon&Hoggan. If someone has
> already made a Python script for this, I would be grateful for sharing
> it.
That would be absolutely awesome! Let us know if you need any help.
>
> As to the Sage code wigner.py, it needs some careful revision. For
> example:
> a) it has assignments just before conditional operators that may
> return; thus these assignments may never be used;
> b) several indices are repeatedly calculated, even inside a loop,
> instead of being assigned to a variable (e.g. l_1 + l_2 - l_3 in
> Gaunt);
> c) type checking for being integer or half integer is not optimal;
> d) usage of ``prec`` (precision) is not consistent throughout the
> code.
Yes, I noticed. I just removed the "prec", for CG coefficients, so
that it works with sympy, at least somehow.
Ondrej
Yep.
>
>>
>> > * In the module level docstring, let's add a comment about this coming
>> > from
>> > Sage with permission to be relicensed.
>>
>> It's already there:
>>
>> http://github.com/certik/sympy/blob/wigner/sympy/physics/wigner.py#L18
>>
>> or do you mean to improve it somehow?
>>
>
> Nope I just missed this. Looks great.
>
>>
>> > * Should be update the docstrings/doctests for the ported functions? We
>> > can
>> > also do this later. I don't want to delay this getting in.
>>
>> We should definitely port the docstrings. I'll try to do some tonight.
>>
>
> Great, but let's not let this prevent this from being merged soon.
I just ported the CG doctests (there were only 3...) to sympy and
pushed the whole thing in.
>
>>
>> > * Does sage have a test suite for this module? If so, should we bring
>> > it
>> > over as well? If not we can just port their doctests.
>> > Other than this, it looks good and I would merge.
>>
>> I didn't find any. If they do, we absolutely need that.
>>
>> I think that Sage only uses doctests, which in many cases (like this)
>> I find insufficient. They have a "TESTS" section, which I think
>> doesn't show up in the documentation, but still I think it's better to
>> test all Clebsches in a separate file. We should test all of them from
>> wikipedia, to make sure we got all the corner cases right.
>>
>
> Yes, I have some really good Russian angular momentum texts at work that
> have thousands of identities we can test...OK, maybe not all of them, but a
> representative set.
Cool. Let's keep improving it.
Ondrej
Aaron Meurer
Konstantin
thanks for this. I would like to have this in sympy itself.
I can see that problem in sympy/core/numbers.py with the "if b >
4294967296" now, we need to address it to make your code working.
Thanks for releasing it under the MIT license, so that we can include
it in sympy. Since it uses pytables, we should move the pytables
import inside the store_gaunts(), and the numpy include as well, so
that sympy works even if the user doesn't have numpy or pytables, and
it will get imported once the user calls such functions.
I think we should put this into sympy/physics/gaunt_tables.py (we
already have there wigner.py).
Ondrej
> Hi Konstantin,
>
> On Thu, Sep 23, 2010 at 12:11 PM, Konstantin Klementiev
> <kklem...@cells.es> wrote:
>> Host gmr-smtp-in.l.google.com detects an illegal attachment, this can only
>> be the sphinx-built html manual in the attached archive. I put now a pdf
>> manual and hope it'll get through...
>
> thanks for this. I would like to have this in sympy itself.
>
> I can see that problem in sympy/core/numbers.py with the "if b >
> 4294967296" now, we need to address it to make your code working.
Issue 2003 gives the correct solution for this by the way.
Aaron Meurer