Changeset 13415 for fact/tools


Ignore:
Timestamp:
04/23/12 13:28:06 (13 years ago)
Author:
neise
Message:
exchanged naming of cols, such that it fits to the way TB does it.
Location:
fact/tools/pyscripts
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/map_dn.txt

    r12869 r13415  
    1 #       CHID    Y       X       x_euk   y_euk   y_h     x_h     softID  hardID
     1#       CHID    Y       X       y_euk   x_euk   y_h     x_h     softID  hardID
    22        0       -7      21      18.1865334794732        3       3       21      1348    0
    33        1       -7      22      19.0525588832576        3.5     4       22      1419    1
  • fact/tools/pyscripts/pyfact/plotters.py

    r13402 r13415  
    114114            plt.ion()
    115115
    116         chid, y,x,xe,ye,yh,xh,softid,hardid = np.loadtxt(map_file_path ,unpack=True)
     116        chid, y,x,ye,xe,yh,xh,softid,hardid = np.loadtxt(map_file_path ,unpack=True)
     117
    117118        self.xe = xe
    118         # -ye in order to correct for the sign difference between my mapping file
    119         # and FACTmap111030.txt
    120         self.ye = -ye
     119        self.ye = ye
    121120
    122121        self.H = (6,0,30./180.*3.1415926)
  • fact/tools/pyscripts/sandbox/dneise/timecal.py

    r13404 r13415  
    1111from pyfact     import RawData
    1212from drs_spikes import DRSSpikes
    13 from extractors import ZeroXing
     13from extractor import ZeroXing
    1414class CalculateDrsTimeCalibrationConstants( object ):
    1515    """ basic analysis class for the calculation of DRS time aperture jitter calibration constants
     
    3434        self.fsampling = 2.         # sampling frequency
    3535        self.freq = 250.            # testfrequency
    36         self.P_nom = 1000./freq     # nominal Period due to testfrequency
     36        self.P_nom = 1000./self.freq     # nominal Period due to testfrequency
    3737        self.DAMPING = 0.02         # Damping applied to correction
    3838       
     
    4848        """       
    4949        # loop over events
     50        counter = 0
    5051        for event in self.run:
     52            print 'counter', counter
     53            counter +=1
    5154            # in the next() method, which is called during looping,
    5255            # the data is automatically amplitude calibrated.
     
    6063            start_cell = event['start_cells'][niners_ids,:]
    6164           
    62             data = despike( data )
     65            data = self.despike( data )
    6366           
    6467            # shift data down by the mean           # possible in one line
     
    111114           
    112115            # first we make the sublists of the lists to be numpy.arrays
    113             for i in len(float_slice_of_all_crossings): #both list have equal length
     116            for i in range(len(float_slice_of_all_crossings)): #both list have equal length
    114117                float_slice_of_all_crossings[i] = np.array(float_slice_of_all_crossings[i])
    115118                time_of_all_crossings[i] = np.array(time_of_all_crossings[i])
     
    120123                all_measured_periods.append(np.diff(chip_times))
    121124           
    122             for chid,chip_periods in enumerate(all_measured_periods):
     125            for chip,chip_periods in enumerate(all_measured_periods):
    123126               
    124127                for i,period in enumerate(chip_periods):
     
    144147                    total_negative_correction = rest * (interval * (pos_fraction/rest))
    145148                    # so we can call the product following 'rest' the 'neg_fraction
    146                     neg_fraction = -1 * interval/rest * important
    147                     assert total_positive_correction - total_negative_correction == 0
     149                    neg_fraction = -1 * interval/rest * pos_fraction
     150                    #print '1. should be zero', total_positive_correction - total_negative_correction
     151                    #assert total_positive_correction - total_negative_correction == 0
    148152                   
    149153                    correction = np.zeros(1024)
     
    151155                    correction[:start+1]      = neg_fraction
    152156                    correction[end+1:]        = neg_fraction
    153                     assert correction.sum() == 0
     157                    #print '2.   should be zero', correction.sum()
     158                    #assert correction.sum() == 0
    154159                   
    155160                    # now we have to add these correction values to self.time_calib
Note: See TracChangeset for help on using the changeset viewer.