source: sans/utils/bt5/bt5plot/BT5DataGroup.py @ 725

Last change on this file since 725 was 725, checked in by ajj, 12 years ago

Work to add auto grouping to bt5plot

File size: 1.2 KB
Line 
1import usans
2import math
3
4class BT5DataGroup:
5    '''Class containing a group of BT5 data sets to be treated as one data group'''
6    def __init__(self, dataSetList=None):
7       
8        self.isPlotted = False
9        self.groupName = None
10        if dataSetList != None:
11            self.groupName = dataSetList[0].fileName[0:5]   
12               
13    def addDataSet(self,addList):
14        '''Add data sets to the group. Takes a list of data set objects'''
15        for dataSet in addList:
16            self.dataSetList.append(dataSet)
17       
18    def removeDataSet(self,dataSetName):
19        '''Remove a data set from the group. Takes a data set name'''
20       
21    def plotDataGroup(self,axes,plottype=None,yerrorbars=True):
22        '''Plot the data group. As with BT5DataSet takes matplotlib axes and some options
23       
24        Pass options to each data set.
25        '''
26   
27    def unplotDataGroup(self):
28        '''Remove the data group from the plot.
29       
30        Calls remove_plot from BT5DataSet
31        '''
32   
33    def calcAlignVals(self,mv):
34        '''Return the values we record in the logbook for a given motor position
35       
36        Determine which data set the motor val belongs to and call function from that class.
37       
38        '''
Note: See TracBrowser for help on using the repository browser.