<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Greetings!<br>
    <br>
    On 02/06/12 03: 13, Stuart Mumford wrote:
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">Hello,<br>
      <br>
      <br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          Sorry - I've been off the list for awhile as I was
          transitioning to my<br>
          first 'real world' job. Now that I'm back - hello! This was my
          first<br>
          attempt at object oriented programming - I'll need to take a
          look at the<br>
          code again to see what I was (or was not) thinking at the time
          :-)<br>
        </blockquote>
        <div><br>
          Nice to have you around to help and I am glad you now have
          some time to help out! For a first attempt at OOP it's very
          good! (well much better than my first attempt was!) I was
          thinking about how would be best to implement it, we want to
          try and mirror as closely as possible the calling sequence of
          PyWavelets and it's DWT routines. They use the approach of <br>
          <br>
          >>> cA, cD = pywt.dwt(data,mother)<br>
          where mother is either a string or an instance of a mother
          class.<br>
          <br>
        </div>
      </div>
    </blockquote>
    I completely agree.<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>So I was thinking would the best code structure to be have
          a "Wavelet" class which is subclassed for cwt, icwt ccwt etc.
          and a Mother class which is subclassed for each family like
          Morlet, DOG etc.<br>
          <br>
          Then into the Wavelet instance you can pass either a subclass
          of mother or a string and go from there.<br>
          <br>
          This is pretty close to how your code is structured at the
          moment, just need to make the main cwt etc. functions
          subclasses of Wavelet?<br>
          <br>
        </div>
      </div>
    </blockquote>
    Yes, I think that will work nicely.<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>As for results I think it would be best to return a class
          when cwt etc. is called and then have attributes such as
          power, data, coefficients etc.<br>
          <br>
          ie <br>
          <br>
          wave = scipy.signal.wavelet.cwt.cwt(data,'morlet')<br>
          pwr = wave.power<br>
          wave.scalogram()<br>
          <br>
          etc.<br>
        </div>
      </div>
    </blockquote>
    <br>
    That makes sense too.<br>
    <br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <br>
          > I shall work on improving that code, I can implement more
          and more general<br>
          > Mother wavelets and also write some examples and update
          the plotting<br>
          > routine to use mpl's make_axes_locatable if people think
          that is a better<br>
          > way to go.<br>
          ><br>
          <br>
          I'd be happy to start working on this again. I'm still
          finishing up my<br>
          PhD, but I am now working as a developer at UCAR / Unidata and
          have some<br>
          time I can officially spend on 'guerrilla projects' like this<br>
          (especially since it can/will benefit the atmospheric science
          community)!<br>
        </blockquote>
        <div><br>
          I am also doing a Solar Physics PhD so this stuff gets used in
          lots of places!! I think as a todo list things that need doing
          are:<br>
          <br>
          * Agree on a calling and code structure and implement.<br>
        </div>
      </div>
    </blockquote>
    Would you like to do the quick restructure?<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>* Implement other wavelet families and make all general in
          order m (ie Mexican hat is just m=2 of DOG)<br>
        </div>
      </div>
    </blockquote>
    I started on that path, but ran into a few speed bumps because the
    admissibility constants can be quite tricky to determine without
    using numerical integration. Maybe not too big of a deal in reality,
    but the two mother wavelets I implemented did the trick for my
    dissertation needs.<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>* Implement a significance contouring routine.<br>
        </div>
      </div>
    </blockquote>
    This was on my to-do list as well. However, I don't think we need to
    implement a contouring routine for SciPy, as that should go to
    Matplotlib or a wavelet cookbook (let's not worry too much about
    that right now - we can use what's there for testing and strip it
    out later).<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>* Develop some tests to show it works!<br>
          <br>
        </div>
      </div>
    </blockquote>
    I've been wanting to come up with some simple analytical tests but
    just have not had time. You are welcome to take a crack at that, but
    I will eventually get to it.<br>
    <br>
    Cheers!<br>
    <br>
    Sean<br>
    <blockquote
cite="mid:CAJ3G1JocDsB1nUWnwiPOWsVvyg+mtJGa0ijeH790C8z7z6r61g@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>There will probably be many little things to find on the
          way along, but I think they are the major points? One other
          question, do we want a plotting routine inside the module or
          keep it as an example in the documentation? I ask because I
          don't know what is the norm.<br>
          <br>
          Stuart <br>
        </div>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SciPy-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SciPy-Dev@scipy.org">SciPy-Dev@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/scipy-dev">http://mail.scipy.org/mailman/listinfo/scipy-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>