Menu

#2650 bug when reading red,green,blue from 3-column text file

nextrelease
open-fixed
nobody
None
5
2024-12-05
2024-12-01
No

Masafumi pointed out when he reads red,green, blue from a three-column text file that the makeColorTable fails without good feedback.

The problem is the text file reader assumes the first columns are times in this case, and puts the time unit in. I suspect the bug has been in there for a while. Interestingly, only Masafumi's table triggers this bug, and when I try to make a subset of his table or fake data, it works fine. The file is on my system at ~/ct/autoplot/u/2024/masafumi/20241201, see demoMakeColorTable.jy.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2024-12-02

    I found code which automatically assumed the first column was times, which did not appear to be necessary. Codes which scan the first few records to guess units had already determined the first column was a time column, so the assumption is not necessary. I've allowed the code to assert that the time units will be AsciiParser.UTC_UNITS, otherwise the column is left alone.
    I'm running regression tests now to verify that nothing is affected.

     

    Last edit: Jeremy Faden 2024-12-02
  • Jeremy Faden

    Jeremy Faden - 2024-12-03

    Pattern-based ASCII file parsing doesn't scan the first lines of a file, so it relied on the units kludge. This will probably need attention, but for now only the mode where the first record is valid will work. See

    file:///home/jbf/ct/hudson/data/dat/events/historyRegex.txt?field2&pattern=(.)\t(.(script|abbith).*)

    which doesn't have a header line, and

    time_a1_a2
    2024-12-03_1_2
    2024-12-03_4_5

    (which should not work).

     

    Last edit: Jeremy Faden 2024-12-03
  • Jeremy Faden

    Jeremy Faden - 2024-12-05

    This is fixed, and all tests still parse okay.

     
  • Jeremy Faden

    Jeremy Faden - 2024-12-05
    • status: open --> open-fixed
     
MongoDB Logo MongoDB