Project

General

Profile

Actions

Bug #616

closed

Wrong number of FADC250 samples, when sample count is odd

Added by Stephen Wood almost 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
02/04/2021
Due date:
% Done:

100%

Estimated time:
Spent time:
Responsible:

Description

In some mode 10 FADC250 data I am looking at, each set of samples starts with 0xAF, indicating 175 samples. This is followed by 88 sample pairs. The last pair is "0x2142000". Bit 13 is on, indicating that the second sample of the last sample pair is invalid, as it should be because there are supposed to be 175, not 176 samples. However, Fadc250Module seems not to catch this so it records 176 samples, with the last sample being zero.

It looks like the code tries to detect this condition, but the code doesn't look right.

"if((sample_1 + 2) fadc_data.win_width && invalid_2) break; // Skip last sample if flagged as invalid"

appears twice. It looks like sample_1 is supposed to be some kind of sample count. But sample_1 is a data value. It should look something like:
if((numberofsamplessofarfadc_data.win_width) && invalid_2) break;

Actions #1

Updated by Ole Hansen almost 4 years ago

Good find. I am actually working on FADC-related things right now (using FADC data in the detector classes) and so will be interested in testing things with FADC data shortly. If this doesn't get fixed by then, I'll keep an eye out for this issue in the debugger. Unfortunately, I don't know much about how this module is supposed to work in detail. The code looks quite messy.

Who is our current FADC expert? Who has documentation?

Actions #2

Updated by Ole Hansen over 3 years ago

  • Status changed from New to Resolved
  • Target version set to 1.7
  • % Done changed from 0 to 100

Fixed in commit e803fc4. The fix might be preliminary. If the problem persists, we can reopen this.

Actions #3

Updated by Ole Hansen about 2 years ago

  • Status changed from Resolved to Closed

Closing this old issue since I haven't heard any further complaints in over a year.

Actions

Also available in: Atom PDF