HOME ESR EXPERIMENTS LABS etc
E121 E127 E132 E125 E143 laser_cooling_2021 E142 Ê128 E146 E0052 E0018
  nuclear two-photon decay  Not logged in ELOG logo
Message ID: 198     Entry time: Fri Jul 2 05:08:16 2021
Author: Guy Leckenby (Canadian beaver team) 
Category: Analysis 
Subject: e143_analyser.py Summing Script 
I've written two scripts that others might find useful for the on-line analysis. 
  1. The first is a simple bash script that runs a for loop to run the e143_analyzer.py script for a sequence of start values (-s). You'll need to change the increment and 
start/end of the for loop to set the time resolution.
  2. The second is a root script that takes the above generated scripts, reads the histograms, and then fills a 2D histogram. You'll need to adjust the TH2 bin number to 
match both the bin number of the TH1s and the number of analysed files. I've included a print line to help identify the TH1 bin number.

To see the first results, I've attached a sum of July 1st 22-23h data. Sadly, I don't see any indication of the isomer, or at least the production is very low.
Attachment 1: e143_sum_ana.bash  193 Bytes  Uploaded Fri Jul 2 06:17:50 2021  | Hide | Hide all
#!/usr/bin/env bash

for i in $(seq 0 0.02 2)
do
	python e143_analyzer.py -t 0.02 -s $i -o 410MHz-07.01.22h_s${i}_t0.02 E143_Data/sparc-daq-02.gsi.de/E143-410MHz/410MHz-2021.07.01.22*.tiq
done
Attachment 2: e143_comparison.C  1 kB  Uploaded Fri Jul 2 06:17:50 2021  | Hide | Hide all
#define e143_comparison_cxx

#include <iostream>
#include <math.h>
#include <vector>
#include "TROOT.h"
#include "TFile.h"
#include "TChain.h"
#include "TTree.h"
#include "TBranch.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TGraphPainter.h"
#include "TColor.h"
#include "TH1.h"
#include "TH2.h"
#include "TH3.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TH3F.h"
#include "THStack.h"
#include "THistPainter.h"

using namespace std;

void e143_comparison()
   {
	TH2 *h1vt_410MHz_07m01d22h_10ms = new TH2F("h1vt_410MHz_07m01d22h_10ms","410Mhz 07.01.22h Additiion (10 ms res);frequency (Hz);time (s)",256,4.06704e+08,4.06753e+08,200,0,2);
	int nframes = 200;
	vector<TFile*> tf_frames;
	vector<TH1*> h1_frames(nframes,NULL);
	char chname[300];
	for(int i=0; i<nframes; i++)
	   {
		sprintf(chname,"E143_Results/410MHz-07.01.22h_s%.2f_t0.01.root",i*0.01);
		//cout << chname << endl;
		tf_frames.push_back(new TFile(chname));
		tf_frames[i]->GetObject("th1f",h1_frames[i]);
		for(long j=0; j<256; j++)
		   {
			h1vt_410MHz_07m01d22h_10ms->SetBinContent(j+1, i+1, h1_frames[i]->GetBinContent(j));
		   }
	   }
	cout << "Total Bins: " << h1_frames[100]->GetNbinsX() << ", Xlow: " << h1_frames[100]->GetBinCenter(1) << ", Xhigh: " << h1_frames[100]->GetBinCenter(h1_frames[100]->GetNbinsX()) << endl;
	
	TCanvas *c1 = new TCanvas("c1","c1",50,50,1000,800);
	h1vt_410MHz_07m01d22h_10ms->Draw("COLZ");

   	TFile *fhists = new TFile("e143_added_th2s.root","RECREATE");
	h1vt_410MHz_07m01d22h_10ms->Write();
	cout << "Written h1vt_410MHz_07m01d22h_10ms to file." << endl;
	fhists->Close();
   }


int main ()
   {
	e143_comparison();

	return 0;
   }
Attachment 3: 410MHz-07.01.22h-sum_20ms.png  46 kB  Uploaded Fri Jul 2 06:19:36 2021  | Hide | Hide all
410MHz-07.01.22h-sum_20ms.png
ELOG V3.1.5-fc6679b