pygac icon indicating copy to clipboard operation
pygac copied to clipboard

Fix number of scalines read from GAC POD files

Open oembury opened this issue 9 months ago • 1 comments

Fixes #136 by changing the gac_pod offset, plus some changes made for investigating:

  • Added an option to disable call to correct_scan_line_numbers
  • Updates pod version of correct_scan_line_numbers to return results from base class
  • Adds code to discard the final scanline if we have:
    • two logical records per physical record (i.e. gac data)
    • an odd number of expected scanlines and actual length is exactly n+1 lines

Note - the final check is currently only discarding the expected padding at the end of a file. It will still read any unexpected padding and attempt to parse as scanlines. For production use it would probably be better to only read self.head["number_of_scans"] scanlines.

oembury avatar Mar 10 '25 11:03 oembury

@mraspaud Does this have any effect on LAC reading?

sfinkens avatar Mar 13 '25 09:03 sfinkens