source: fact/tools/pyscripts/paux.py@ 13148

Last change on this file since 13148 was 12610, checked in by lusterma, 13 years ago
added pyscripts folder to tools added fsc3.py, fscvolt1.py for plotting voltages and temperature added paux.py for running on a set of data files
File size: 1.7 KB
Line 
1#!/usr/bin/python26
2
3import glob
4from os import path
5from os import system
6
7#import pyfits
8
9from fscvolt1 import FSC_VOLTAGE
10from fsc3 import FSC_TEMPERATURE
11
12class 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
54if __name__ == '__main__':
55
56 print 'FACT SLOW CONTROL DATA: PAUX'
57
58 paux = PAUX(2011, 11)
59 paux.anatemp()
60
Note: See TracBrowser for help on using the repository browser.