Changeset 13450 for fact


Ignore:
Timestamp:
04/25/12 18:57:44 (13 years ago)
Author:
neise
Message:
ready for testing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/sandbox/dneise/gain/gain_hdf5.py

    r13449 r13450  
    8282                                compression='gzip')
    8383
     84result_baseline               = f.create_dataset('baseline',
     85                                (run.nevents, run.npix),
     86                                dtype=np.float32,
     87                               
     88
     89
    8490try:
    8591
     
    140146                    max_smoothed[i]  = dat[max_pos[i]]
    141147                    max_orig[i]      = orig[max_pos[i]-filter_delay]
    142            
    143             result_peak_positions[event_id,pixel_id, :len(max_pos)]         = max_pos
    144             result_peak_unfiltered_height[event_id,pixel_id, :len(max_pos)] =max_orig
    145             result_peak_smoothed_height[event_id,pixel_id, :len(max_pos)]   = max_smoothed
     148            if len(max_pos) > 0:
     149                result_peak_positions[event_id,pixel_id, :len(max_pos)]         = max_pos
     150                result_peak_unfiltered_height[event_id,pixel_id, :len(max_pos)] =max_orig
     151                result_peak_smoothed_height[event_id,pixel_id, :len(max_pos)]   = max_smoothed
    146152
    147153
    148 f.close()
     154    f.close()
    149155
    150156except:
Note: See TracChangeset for help on using the changeset viewer.