Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with writing raw spectrograms from triggered ROACH data #173

Open
cclaessens opened this issue Oct 18, 2018 · 1 comment
Open
Labels

Comments

@cclaessens
Copy link
Contributor

using ROOTSpectrogramWriter with this configuration:

writer:
    output-file: "KTOutput/raw_spectrogram.root"
    file-flag: recreate
    mode: sequential #single
    n-time-bins: 100
    #min-time: 0
    #max-time: 1
    min-freq: 25e6
    max-freq: 75e6

Issues:
Katydid fails to create the output file. Instead there was this file at the location where I ran katydid:
7e3f-af33-819b-1ee4.root
The file is 1.7GB big and does contain spectrograms. When I opened it with ROOT, I got warnings that the file is broken but the spectrograms could be recovered:

Info in <TFile::Recover>: 7e3f-af33-819b-1ee4.root, recovered key TH2D:FSFFTWSpectrogram_523_0 at address 1728812965

The time axis of the spectrograms is not correct. Every acquisition has the same x axis starting at the start time in run of the first acquisition in the file.

Elise forwarded me a fix from Yu-Hao:

I at least got sequential mode working. If you find the source file KTROOTSpectrogramWriter.cc in source files under IO, around line 170-180 there is an if statement

if (isNewAcq && dataBundle.fSpectrograms.size() != 0)

Change it into something like

if (isNewAcq && 1== 0)

So that the part below never run.
I believe that is the most substantial change that made it working.

With this workaround katydid now creates a "healthy" root file. However now all the spectrograms are of the same length and the time axis is still the same for all of them. It seems that the acquisitions now get stitched together (which makes sense as the writer is no longer treating new acquisitions) and split once the TH2D reaches a certain size.

The file size with the workaround is 3.8GB. And changing n-time-bins in the configuration has no effect on the file size and content.

@elisenovitski
Copy link
Contributor

Thanks, Christine. I think you summed it all up there. My apologies for not documenting my earlier difficulties properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants