Stuart Mumford | 8 Jun 2012 15:17
Picon
Gravatar

Procedure for new code submission (pyHHT)

Hello,

I am working on a EMD / HHT code for some analysis I am doing as part of my PhD. (It is currently here: https://github.com/Cadair/pyhht (kicked off from jaidevd's inital work))

I was wondering what the general procedure for getting something like this included in SciPy is. I know it requires a lot more work to even be considered but I would like to focus what I am doing with that end in mind.

The Web here: http://scipy.github.com/dev-zone.html says that initially you should write a SciKit, is this still the way to go or is it fine just to create a repo with good quality documentation etc?

Also is a HHT toolbox something that should be integrated into scipy.signal or (at risk of restarting an amusing debate) should it go into scikit.signal??

Stuart

_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Robert Kern | 8 Jun 2012 15:50
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

On Fri, Jun 8, 2012 at 3:17 PM, Stuart Mumford <stuart <at> mumford.me.uk> wrote:
> Hello,
>
> I am working on a EMD / HHT code for some analysis I am doing as part of my
> PhD. (It is currently here: https://github.com/Cadair/pyhht (kicked off from
> jaidevd's inital work))
>
> I was wondering what the general procedure for getting something like this
> included in SciPy is. I know it requires a lot more work to even be
> considered but I would like to focus what I am doing with that end in mind.
>
> The Web here: http://scipy.github.com/dev-zone.html says that initially you
> should write a SciKit, is this still the way to go or is it fine just to
> create a repo with good quality documentation etc?

It is fine to create your project with whatever structure you like.

> Also is a HHT toolbox something that should be integrated into scipy.signal
> or (at risk of restarting an amusing debate) should it go into
> scikit.signal??

The Hilbert-Huang Transform is encumbered by a patent in the US. I
recommend keeping it contained to a single package and not integrate
it into another open source library.

--

-- 
Robert Kern
Stuart Mumford | 8 Jun 2012 16:09
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

Hello,

> It is fine to create your project with whatever structure you like.

Fair enough!!

> The Hilbert-Huang Transform is encumbered by a patent in the US.
Oh great!

> I recommend keeping it contained to a single package and not integrate
it into another open source library.

Seems sensible, then people can take it or leave it as required!

Thanks for your help.


Moving away from HHT, what are the documentation requirements and testing requirements for submissions in general?

The test classes as written like https://github.com/numpy/numpy/blob/master/doc/TESTS.rst.txt test the execution of the code and the results? So in writing a test class do you need to develop a test set of data and check that the result of the test is what is expected? Then more over how do you justifiy what is expected is correct. For a certian function (like HHT or Wavelet) do you have to check the transform against a simple generated signal that makes it clear the output is correct or a test 'real life' dataset?

Also for dicumentation am I right in thinking that API reference is created from docstrings and a tutorial style documentation should be made seperatly?

Thanks
Stuart

_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Alan G Isaac | 8 Jun 2012 16:10
Picon

Re: Procedure for new code submission (pyHHT)

On 6/8/2012 9:50 AM, Robert Kern wrote:
> The Hilbert-Huang Transform is encumbered by a patent in the US.

Despite being developed with taxpayer dollars.
And then Nasa bragged about "making the technology available"
through its patent auction.  What a bad joke on the public.

Alan Isaac
Stuart Mumford | 8 Jun 2012 16:20
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)


Despite being developed with taxpayer dollars.
And then Nasa bragged about "making the technology available"
through its patent auction.  What a bad joke on the public.

Indeed! What are the restiructions on use? Preseumably you can use it for acedemic purposes etc.?

Stuart
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Alan G Isaac | 8 Jun 2012 16:40
Picon

Re: Procedure for new code submission (pyHHT)

On 6/8/2012 10:20 AM, Stuart Mumford wrote:
> What are the restiructions on use? Preseumably you can use it for 
> acedemic purposes etc.?

Welcome to the ongoing US effort to stifle knowledge creation:
http://www.invention-protection.com/ip/publications/docs/Can_Academic_Experimental_Use_Survive.html

Note that in the US we have a single constitutional justification for 
patents
and copyright: that they **promote progress**.  Our patent system has
been in serious violation of this since Warren Burger wrote Diamond vs. 
Chakrabarty:
http://en.wikipedia.org/wiki/Diamond_v._Chakrabarty
One reason that open source software is so absolutely critical in this
environment is that it provides a well documented history of "prior art".

Alan Isaac
Pauli Virtanen | 8 Jun 2012 17:05
Picon
Picon
Favicon

Re: Procedure for new code submission (pyHHT)

Stuart Mumford <stuart <at> mumford.me.uk> writes:
> Hello,I am working on a EMD / HHT code for some analysis 
> I am doing as part of my PhD. (It is currently here:
> https://github.com/Cadair/pyhht (kicked off from jaidevd's inital work))
> I was wondering what the general procedure for getting something
> like this included in SciPy is. I know it requires a lot more work
> to even be considered but I would like to focus what I am doing
> with that end in mind.

If the code is something that is useful across scientific fields, then IMO
it can be bundled with Scipy.

In this case, we have the misfortune of knowing beforehand
that the algorithm is patented in US, and although as ridiculous
it is, this makes the code poisonous for many US-based users.
So, I'd say that this cannot be included in Scipy which does
have US-based users and redistributors...

> The Web here:
> http://scipy.github.com/dev-zone.html says that initially you should
> write a SciKit, is this still the way to go or is it fine just to
> create a repo with good quality documentation etc? 

The information on that page is a bit outdated. This one is more up to date:

    https://github.com/scipy/scipy/blob/master/HACKING.rst.txt

Note that being a "SciKit" is mostly just a matter of branding --- you make a  
separate Python package from your code as usual (which you seem to be working 
towards), call it "PyHHT Scikit", and add it to the "Topical software" list at 
scipy.org

We earlier recommended naming the package as "scikits.XXX" but this
turned out to bring in some technical problems in the long run, so
that part is optional.

> Also is a HHT toolbox something that should be integrated
> into scipy.signal or (at risk of restarting an amusing debate)
> should it go into scikit.signal??

Without the patent issues, scipy.signal would be the correct location.
I'm not sure if scikit.signal is dead or just sleeping.

--

-- 
Pauli Virtanen
Jaidev Deshpande | 8 Jun 2012 21:39
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

Hi,

I agree that HHT should remain isolated for the moment. When it
matures, the community can decide where it should reside.

As for the IPR status of the HHT, I want to share the reply Dr Norden
Huang gave when I asked him about it.

"The NASA patent covers only the US.  You are free to do whatever outside US
territory as long as you do not make money in the US.  Go ahead with your
project, and good luck."

Now, I would assume that this exempts research based on the HHT from
the IPR regulations, even in the US. A lot of people have been doing
it for almost a decade now, and many were Americans. And I don't think
anyone pays or gets paid for using the HHT algorithms for academic
purposes. And anyhow, there are many implementations of HHT on
matlabcentral.com, there are freely available R packages too.

Also, scipy.signal itself has a long way to go before we can include
something like HHT.

Regards,

On Fri, Jun 8, 2012 at 6:47 PM, Stuart Mumford <stuart <at> mumford.me.uk> wrote:
> Hello,
>
> I am working on a EMD / HHT code for some analysis I am doing as part of my
> PhD. (It is currently here: https://github.com/Cadair/pyhht (kicked off from
> jaidevd's inital work))
>
> I was wondering what the general procedure for getting something like this
> included in SciPy is. I know it requires a lot more work to even be
> considered but I would like to focus what I am doing with that end in mind.
>
> The Web here: http://scipy.github.com/dev-zone.html says that initially you
> should write a SciKit, is this still the way to go or is it fine just to
> create a repo with good quality documentation etc?
>
> Also is a HHT toolbox something that should be integrated into scipy.signal
> or (at risk of restarting an amusing debate) should it go into
> scikit.signal??
>
> Stuart
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
Robert Kern | 8 Jun 2012 22:11
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

On Fri, Jun 8, 2012 at 9:39 PM, Jaidev Deshpande
<deshpande.jaidev <at> gmail.com> wrote:
> Hi,
>
> I agree that HHT should remain isolated for the moment. When it
> matures, the community can decide where it should reside.
>
> As for the IPR status of the HHT, I want to share the reply Dr Norden
> Huang gave when I asked him about it.
>
> "The NASA patent covers only the US.  You are free to do whatever outside US
> territory as long as you do not make money in the US.  Go ahead with your
> project, and good luck."

Dr Huang does not own the patent anymore. Ocean Tomo Federal Services
LLC does, unless if they've sold it off. I do not believe he can give
you a license to the patent. His opinion about what can be done
without acquiring a license to the patent is in conflict with US law.

> Now, I would assume that this exempts research based on the HHT from
> the IPR regulations, even in the US. A lot of people have been doing
> it for almost a decade now, and many were Americans. And I don't think
> anyone pays or gets paid for using the HHT algorithms for academic
> purposes.

Sorry, I'm afraid not. I believe the current law of the land was laid
out in Madey v. Duke which interprets "commercial use" *extremely*
broadly. Universities charge tuition and take in research grant money,
and using patented inventions without paying royalties would make a
university's program more attractive, both from students paying
tuition and granting agencies, than otherwise. That was enough of a
commercial nexus for that judge. It also draws on previous cases that
limit the experimental use defense to cases where the use is "solely
for amusement, to satisfy idle curiosity, or for strictly
philosophical inquiry". University research programs are anything but
idle curiosity, I'm afraid. The Supreme Court declined to review the
case, leaving it the controlling precedent nationwide, and it has not
been overruled to my knowledge.

Here is the decision, edited down to the juiciest bits:

  http://cyber.law.harvard.edu/people/tfisher/2002Madeyedit.html

> And anyhow, there are many implementations of HHT on
> matlabcentral.com, there are freely available R packages too.

Sure. You can write open source software that includes patented
inventions. Users of that software have the responsibility to
independently acquire a license for the patent. The fact that academic
users have long ignored that responsibility just shows their ignorance
of the law (and I don't entirely blame them since it's complicated);
it is not a reflection of the law itself.

--

-- 
Robert Kern
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Jaidev Deshpande | 8 Jun 2012 23:09
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

> Universities charge tuition and take in research grant money,
> and using patented inventions without paying royalties would make a
> university's program more attractive, both from students paying
> tuition and granting agencies, than otherwise. That was enough of a
> commercial nexus for that judge. It also draws on previous cases that
> limit the experimental use defense to cases where the use is "solely
> for amusement, to satisfy idle curiosity, or for strictly
> philosophical inquiry". University research programs are anything but
> idle curiosity, I'm afraid. The Supreme Court declined to review the
> case, leaving it the controlling precedent nationwide, and it has not
> been overruled to my knowledge.
>
> Here is the decision, edited down to the juiciest bits:
>
>  http://cyber.law.harvard.edu/people/tfisher/2002Madeyedit.html
>

Wow..

> Sure. You can write open source software that includes patented
> inventions. Users of that software have the responsibility to
> independently acquire a license for the patent. The fact that academic
> users have long ignored that responsibility just shows their ignorance
> of the law (and I don't entirely blame them since it's complicated);
> it is not a reflection of the law itself.

So then, what do you think we should do?
Robert Kern | 8 Jun 2012 23:44
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

On Fri, Jun 8, 2012 at 11:09 PM, Jaidev Deshpande
<deshpande.jaidev <at> gmail.com> wrote:
>> Universities charge tuition and take in research grant money,
>> and using patented inventions without paying royalties would make a
>> university's program more attractive, both from students paying
>> tuition and granting agencies, than otherwise. That was enough of a
>> commercial nexus for that judge. It also draws on previous cases that
>> limit the experimental use defense to cases where the use is "solely
>> for amusement, to satisfy idle curiosity, or for strictly
>> philosophical inquiry". University research programs are anything but
>> idle curiosity, I'm afraid. The Supreme Court declined to review the
>> case, leaving it the controlling precedent nationwide, and it has not
>> been overruled to my knowledge.
>>
>> Here is the decision, edited down to the juiciest bits:
>>
>>  http://cyber.law.harvard.edu/people/tfisher/2002Madeyedit.html
>>
>
> Wow..
>
>> Sure. You can write open source software that includes patented
>> inventions. Users of that software have the responsibility to
>> independently acquire a license for the patent. The fact that academic
>> users have long ignored that responsibility just shows their ignorance
>> of the law (and I don't entirely blame them since it's complicated);
>> it is not a reflection of the law itself.
>
> So then, what do you think we should do?

I am not a lawyer, and this is not legal advice.

If you're in the US, you will have to decide for yourself whether or
not to continue developing the software. It's up to you, and possibly
your institution's legal department.

If you're not in the US, you're probably (*probably*) fine to continue
to develop and publish your software. But please do clearly document
that the algorithms are patented in the US. Ideally, you would include
contact information for the patent owner; Dr Huang might have the
correct contact information. It might help to include a brief warning
like mine above (but in your own words, please) that most "research
uses" people think of are not actually permitted without a patent
license under US law. I don't know if there is a good web page
describing the problem, but the EFF may have one. Maybe there's even a
petition that you can link to. But that's purely up to you.

In any case, it's best to keep the HHT code in its own package.

--

-- 
Robert Kern
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Stuart Mumford | 8 Jun 2012 23:46
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

Wow you really do have to love US (and international) patent law.

As for what I think we should do? Write a decent HHT implementation, put it online and be careful what we use it for.

Stuart

_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Paul Kuin | 9 Jun 2012 08:47
Picon

Re: Procedure for new code submission (pyHHT)

It was my understanding that patents developed under research
contracts for NASA were encumbered with restrictions that allow the
free use for teaching and (federally funded) research, but that may
have changed in recent years. Perhaps it would be good to check if
such a restriction is on the patent. A question to ask NASA?, or was
there something passed into law that applies to all software developed
with federal funding?  Been away from the US for a while now, so it
might have changed.  But clearly, for any other use, the user will
have to get a licence (in the US).  Are there export restrictions ?

--
   Paul  Kuin

On Fri, Jun 8, 2012 at 9:11 PM, Robert Kern <robert.kern <at> gmail.com> wrote:
> On Fri, Jun 8, 2012 at 9:39 PM, Jaidev Deshpande
> <deshpande.jaidev <at> gmail.com> wrote:
>> Hi,
>>
>> I agree that HHT should remain isolated for the moment. When it
>> matures, the community can decide where it should reside.
>>
>> As for the IPR status of the HHT, I want to share the reply Dr Norden
>> Huang gave when I asked him about it.
>>
>> "The NASA patent covers only the US.  You are free to do whatever outside US
>> territory as long as you do not make money in the US.  Go ahead with your
>> project, and good luck."
>
> Dr Huang does not own the patent anymore. Ocean Tomo Federal Services
> LLC does, unless if they've sold it off. I do not believe he can give
> you a license to the patent. His opinion about what can be done
> without acquiring a license to the patent is in conflict with US law.
>
>> Now, I would assume that this exempts research based on the HHT from
>> the IPR regulations, even in the US. A lot of people have been doing
>> it for almost a decade now, and many were Americans. And I don't think
>> anyone pays or gets paid for using the HHT algorithms for academic
>> purposes.
>
> Sorry, I'm afraid not. I believe the current law of the land was laid
> out in Madey v. Duke which interprets "commercial use" *extremely*
> broadly. Universities charge tuition and take in research grant money,
> and using patented inventions without paying royalties would make a
> university's program more attractive, both from students paying
> tuition and granting agencies, than otherwise. That was enough of a
> commercial nexus for that judge. It also draws on previous cases that
> limit the experimental use defense to cases where the use is "solely
> for amusement, to satisfy idle curiosity, or for strictly
> philosophical inquiry". University research programs are anything but
> idle curiosity, I'm afraid. The Supreme Court declined to review the
> case, leaving it the controlling precedent nationwide, and it has not
> been overruled to my knowledge.
>
> Here is the decision, edited down to the juiciest bits:
>
>  http://cyber.law.harvard.edu/people/tfisher/2002Madeyedit.html
>
>> And anyhow, there are many implementations of HHT on
>> matlabcentral.com, there are freely available R packages too.
>
> Sure. You can write open source software that includes patented
> inventions. Users of that software have the responsibility to
> independently acquire a license for the patent. The fact that academic
> users have long ignored that responsibility just shows their ignorance
> of the law (and I don't entirely blame them since it's complicated);
> it is not a reflection of the law itself.
>
> --
> Robert Kern
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
Robert Kern | 9 Jun 2012 09:10
Picon
Gravatar

Re: Procedure for new code submission (pyHHT)

On Sat, Jun 9, 2012 at 8:47 AM, Paul Kuin <npkuin <at> gmail.com> wrote:
> It was my understanding that patents developed under research
> contracts for NASA were encumbered with restrictions that allow the
> free use for teaching and (federally funded) research, but that may
> have changed in recent years. Perhaps it would be good to check if
> such a restriction is on the patent. A question to ask NASA?, or was
> there something passed into law that applies to all software developed
> with federal funding?  Been away from the US for a while now, so it
> might have changed.  But clearly, for any other use, the user will
> have to get a licence (in the US).  Are there export restrictions ?

The people to ask would be the current owners of the patent, Ocean
Tomo Federal Services, LLC.

--

-- 
Robert Kern
_______________________________________________
SciPy-Dev mailing list
SciPy-Dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
Pauli Virtanen | 9 Jun 2012 00:11
Picon
Picon
Favicon

Re: Procedure for new code submission (pyHHT)

Hi,

08.06.2012 21:39, Jaidev Deshpande kirjoitti:
[clip]
> Also, scipy.signal itself has a long way to go before we can include
> something like HHT.

Out of curiosity, what's missing that would prevent inclusion of HHT?

I'm not into this field myself, so I can't tell (and I admit that I
don't even know what is in scipy.signal currently :)

Cheers,

Gmane