Changeset 3490


Ignore:
Timestamp:
21/02/08 13:51:10 (11 years ago)
Author:
astephen
Message:

Fixed bug so A and NAUXV update fully when 2110 and 2310 found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/nc_interface/na_content_collector.py

    r3482 r3490  
    375375 
    376376                    # Now auxiliary variable info here with independent var info 
     377                    # First aux var is NX 
     378                    self.na_dict["A"] = [self.na_dict["NX"][:]] 
    377379                    ind_var_name = self.na_dict["XNAME"][0] 
    378380                    self.na_dict["ANAME"] = ["Number of '%s' values recorded in subsequent data records" % ind_var_name] 
     
    399401 
    400402                    # Now auxiliary variable info here with independent var info 
     403                    # First three aux vars are NX, X0 and DX 
     404                    self.na_dict["A"] = [] 
     405                    self.na_dict["A"].append(self.na_dict["NX"][:]) 
     406                    self.na_dict["A"].append([i[1][0] for i in self.na_dict["X"]]) 
     407                    self.na_dict["A"].append(self.na_dict["DX"][:]) 
    401408                    ind_var_name = self.na_dict["XNAME"][0] 
    402409                    self.na_dict["ANAME"] = ["Number of '%s' values recorded in subsequent data records" % ind_var_name, 
     
    410417        """ 
    411418        Method to define NASA Ames file object auxiliary variables and their 
    412         associated metadata. 
     419        associated metadata. Note that "A" may already have content if 
     420        independent variable items (relating to "X") are defined as aux vars. 
    413421        """ 
    414422        # Initialise aux var itesms as empty lists unless already defined when 
     
    426434            self.na_dict["ASCAL"].append(1) 
    427435            # Populate the variable list with the array 
    428             self.na_dict["A"].append(var._data) 
    429  
    430         self.na_dict["NAUXV"] = len(self.na_dict["ANAME"]) 
     436            self.na_dict["A"].append(var.tolist()) 
     437 
     438        self.na_dict["NAUXV"] = len(self.na_dict["A"]) 
    431439 
    432440    def _appendAxisDefinition(self, axis): 
Note: See TracChangeset for help on using the changeset viewer.