Project

General

Profile

Bug #796

xboa inconsistent features?

Added by Rajaram, Durga about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11 November 2011
Due date:
% Done:

100%

Estimated time:

Description

Hi,
xboa Hit.new_from_read_builtin seems to not like a formatted file with header lines
whereas
Bunch.new_dict_from_read_builtin assumes header lines and skips them

Feature? Or bug? Or am I missing something?

Attached python script and input files with & without header


Files

xboa_debug.py (1.33 KB) xboa_debug.py Rajaram, Durga, 11 November 2011 15:59
beam_head.dat (214 Bytes) beam_head.dat Rajaram, Durga, 11 November 2011 15:59
beam_headless.dat (180 Bytes) beam_headless.dat Rajaram, Durga, 11 November 2011 15:59
#1

Updated by Rogers, Chris about 12 years ago

It's a feature. Hit.new_from_read_builtin reads one "hit", which in most file formats corresponds to a single line. Bunch.new_dict_from_read_builtin reads in an entire bunch or set of bunches, so reads in the entire file. I could imagine some feature in Hit.read_blah to auto-detect when the read is on a header line and ignore it. But the difference is Hit read function is reading line-by-line whereas bunch read function is reading file-by-file.

Does that answer the question?

#2

Updated by Rajaram, Durga about 12 years ago

Thanks.
I realized that Hit.read works line by line but was not sure if it was designed to return an error
on encountering a header line -- instead of maybe skipping or returning something which can interpreted
as a header read; but that's probably more complicated than code just skipping before calling Hit.read

#3

Updated by Rogers, Chris about 12 years ago

  • Assignee set to Rogers, Chris

It's difficult because sometimes header lines just don't have a specific format. I would rather throw an error if there is an unexpected string in the input (e.g. nan or inf) and ask the use to skip any header lines. I'll try to update the documentation to make this explicit.

#4

Updated by Rogers, Chris about 12 years ago

  • Project changed from MAUS to x-boa
#5

Updated by Rogers, Chris about 12 years ago

  • Target version set to xboa-1.0
#6

Updated by Rogers, Chris almost 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Documentation updated

Also available in: Atom PDF