source: TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py @ 1027

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py@1027
Revision 1027, 1.6 KB checked in by domlowe, 14 years ago (diff)

fixed API imports across all modules

Line 
1''' ops_GridSeriesFeature  contains operations for GridSeriesFeatures'''
2from API import *
3
4def testmethod(self):
5    print 'testmethod for gridseries feature'
6    return 'testmethod - gridseries'
7
8def getAllowedSubsettings(self):
9    return ['subsetToGridSeries']
10
11def getDomainReference(self):
12    #Inspects a time position list for the domain reference.
13    #TODO, does not handle a file extract in place of a list.
14    if isinstance(self.domain.domainReference,Parser.TimePositionList):
15        time = {}
16        time['t'] = self.domain.domainReference.timePositions
17        domainref  = time
18    return domainref
19   
20#     def __getDomainComplement(self):
21#         #This will return a list containing one or more ordinates:
22#         #currently in form [Name, values]
23#         domaincomp ={}
24#         dc = self.domain.domainComplement
25#         #dc should be a grid!
26#         if isinstance(dc, Grid):
27#             for ordinate in dc.ordinates:
28#                 fe=CSMLAbstractFileExtract(ordinate.axisValues)
29#                 domaincomp[ordinate.definesAxis]=fe.getAxisData()
30#                 fe.close()
31#         return domaincomp
32           
33# #     def getDomain(self):
34# #         #returns both the domain reference axes and domain compliment axes in a single domain dictionary
35# #         #axes are in no particular order
36# #         domain = {}
37# #         dr=self.__getDomainReference()
38# #         dc=self.__getDomainComplement()
39# #         for key in dc.keys():
40# #             domain[key]=dc[key]
41# #         for key in dr.keys():
42# #             domain[key]=dr[key]
43# #         return domain
Note: See TracBrowser for help on using the repository browser.