1 | #!/usr/bin/python26
|
---|
2 |
|
---|
3 | import glob
|
---|
4 | from os import path
|
---|
5 | from os import system
|
---|
6 |
|
---|
7 | #import pyfits
|
---|
8 |
|
---|
9 | from fscvolt1 import FSC_VOLTAGE
|
---|
10 | from fsc3 import FSC_TEMPERATURE
|
---|
11 |
|
---|
12 | class PAUX( object ):
|
---|
13 |
|
---|
14 | def __init__( self, year = 2011, month = 11, day = 0, dpoff = '../' ):
|
---|
15 |
|
---|
16 | self.year = str( year )
|
---|
17 | self.month = str( month )
|
---|
18 | self.day = str( day )
|
---|
19 | self.dpoffset = dpoff
|
---|
20 |
|
---|
21 | def anatemp( self ):
|
---|
22 |
|
---|
23 | # fsc temperatures
|
---|
24 | self.dpath = '../temperature/'
|
---|
25 | self.searchpath = self.dpath + self.year + self.month + '*.FSC_CONTROL_TEMPERATURE.fits'
|
---|
26 | print 'searchpath', self.searchpath
|
---|
27 | dflist = glob.glob( self.searchpath )
|
---|
28 | print 'dflist', dflist, 'shape: ', len(dflist)
|
---|
29 | for i, file in enumerate( dflist ):
|
---|
30 | file = file[15:]
|
---|
31 | print 'file: ', i, ': ', file
|
---|
32 | tdata = FSC_TEMPERATURE( dpath = self.dpath, dfile = file )
|
---|
33 | tdata.plot_means()
|
---|
34 | tdata.plot_groups()
|
---|
35 |
|
---|
36 |
|
---|
37 | def anavolt( self ):
|
---|
38 |
|
---|
39 | # fsc voltages
|
---|
40 | self.dpath = '../voltage/'
|
---|
41 | self.searchpath = self.dpath + self.year + self.month + '*.FSC_CONTROL_VOLTAGE.fits'
|
---|
42 | # print 'searchpath', self.searchpath
|
---|
43 | dflist = glob.glob( self.searchpath )
|
---|
44 | #print 'dflist', dflist, 'shape: ', len(dflist)
|
---|
45 | for i, file in enumerate( dflist ):
|
---|
46 | print 'file: ', i, ': ', file
|
---|
47 | vdata = FSC_VOLTAGE( dpath = self.dpath, dfile = file )
|
---|
48 | vdata.vplot_all()
|
---|
49 | del vdata
|
---|
50 |
|
---|
51 |
|
---|
52 |
|
---|
53 |
|
---|
54 | if __name__ == '__main__':
|
---|
55 |
|
---|
56 | print 'FACT SLOW CONTROL DATA: PAUX'
|
---|
57 |
|
---|
58 | paux = PAUX(2011, 11)
|
---|
59 | paux.anatemp()
|
---|
60 |
|
---|