Hi,

Actually, this is not quite true.  If you had shifted this code into
data_store and replaced:

"""
class Assignment:

[snip]

class Nmrglue_data(list):
"""


with:

"""
from data_store.data_classes import Element, RelaxListType

class Assignment(Element):

[snip]

class Nmrglue_data(RelaxListType):
"""

It would have instantly worked.

Regards,

Edward

On 7 December 2014 at 23:42,  <tlin...@nmr-relax.com> wrote:
> Author: tlinnet
> Date: Sun Dec  7 23:42:58 2014
> New Revision: 27003
>
> URL: http://svn.gna.org/viewcvs/relax?rev=27003&view=rev
> Log:
> Removing the Nmrglue_data() class object type.
>
> relax cannot handle storing class object types.
>
> Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to 
> nmrglue, to read .ft2 files and process them.
> Homepage: http://www.nmrglue.com/
> Link to nmrglue discussion: 
> https://groups.google.com/forum/#!forum/nmrglue-discuss
> The code is develop at Github: https://github.com/jjhelmus/nmrglue/
> Documentation: http://nmrglue.readthedocs.org/en/latest/index.html
>
> Modified:
>     branches/nmrglue/lib/spectrum/objects.py
>
> Modified: branches/nmrglue/lib/spectrum/objects.py
> URL: 
> http://svn.gna.org/viewcvs/relax/branches/nmrglue/lib/spectrum/objects.py?rev=27003&r1=27002&r2=27003&view=diff
> ==============================================================================
> --- branches/nmrglue/lib/spectrum/objects.py    (original)
> +++ branches/nmrglue/lib/spectrum/objects.py    Sun Dec  7 23:42:58 2014
> @@ -31,38 +31,6 @@
>
>  class Assignment:
>      """A special container for a single assignment in a peak list."""
> -
> -
> -class Nmrglue_data(list):
> -    """The object used to represent a nmrglue data."""
> -
> -    def __init__(self):
> -        """Set up the object."""
> -
> -
> -    def add(self, file_path=None, dic=None, udic=None, data=None):
> -        """Add a nmrglue data element.
> -
> -
> -        @keyword file_path:         The path to the spectrum.
> -        @type file_path:            str
> -        @keyword dic:               The data dictionary.
> -        @type dic:                  dic
> -        @keyword udic:              The universal data dictionary.
> -        @type udic:                 dic
> -        @keyword data:              The data as numpy array.
> -        @type data:                 numpy array
> -        """
> -
> -        # Add a new element.
> -        self.append(Assignment())
> -
> -        # Store the data.
> -        assign = self[-1]
> -        assign.file_path = file_path
> -        assign.dic = dic
> -        assign.udic = udic
> -        assign.data = data
>
>
>  class Peak_list(list):
>
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-commits mailing list
> relax-comm...@gna.org
>
> To unsubscribe from this list, get a password
> reminder, or change your subscription options,
> visit the list information page at
> https://mail.gna.org/listinfo/relax-commits

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to