28     for filename 
in filenames:
 
   31         modelFile = TFile.Open(filename,
"READ")
 
   32         tpcName=filename.replace(
'.root',
'')
 
   34         powerHist_ind1 = modelFile.Get(noise_type+
"powerI1")
 
   36         powerHist_ind2 = modelFile.Get(noise_type+
"powerI2")
 
   38         powerHist_coll = modelFile.Get(noise_type+
"powerC")
 
   40         freq = [fr_ind1,fr_ind2,fr_coll]
 
   41         amps = [amps_ind1,amps_ind2,amps_coll]
 
   42         gain = [8.811970678500002e-10,8.811970678500002e-10,8.811970678500002e-10]
 
   43         period = [400.0,400.0,400.0]
 
   44         nsamples = [powerHist_ind1.GetXaxis().GetNbins()*2,powerHist_ind2.GetXaxis().GetNbins()*2,powerHist_coll.GetXaxis().GetNbins()*2]
 
   45         shaping = [1.3,1.3,1.3]
 
   46         wirelen = [8949.51,3658.0939799999996,3658.0939799999996]
 
   49             ns = { 
'period' : period[n],
 
   50               'nsamples' : nsamples[n],
 
   52               'shaping' : shaping[n],
 
   53               'wirelen': wirelen[n],
 
   57               'freqs' : 
list(freq[n]),
 
   58               'amps' : 
list(amps[n])
 
   61         json_format = json.dumps(noises,indent=4)
 
   62         int_noise_file = 
open(
'icarus_noise_model_'+noise_type+
'_TPC'+tpcName+
'.json',
'w')
 
   63         int_noise_file.write(json_format)
 
   64         int_noise_file.close()