Coverage for pyrdnap / v1grid / __init__.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-26 15:17 -0400

1 

2# -*- coding: utf-8 -*- 

3 

4u'''Extract from the original, compressed, variant 1 grid files 

5C{nlgeo2018.txt.zip} and C{rdcorr2018.txt.zip} the C{NAP_...}, 

6C{lat_corr_} and C{lon_corr_} columns B{only} and encode each 

7in Python as a row-order matrix, a 481-tuple of 301-arrays of 

8single- or double precision floats. 

9 

10Of the 144,781 floats (481 x 301) in the C{lat_corr_} and 

11C{lon_corr_} columns of the original grid file C{/rdcorr2018.txt} 

12only 55,139 respectively 55,348 are non-zero between indices 

13[8598:93827] respectively [8598:93830]. 

14 

15As a result, the first 28 and the last 169 rows (in total 197 

16rows or 41% of 481) are represented by the same 301-array of 

17single-precision zeros. There are other stretches of zeros, 

18but none amount to 301 or more. 

19''' 

20from pyrdnap.v_grids import _d_array, _f_array, _v_grid_txt 

21 

22__all__ = () 

23__version__ = '26.05.12' 

24 

25_NAP_h = _v_grid_txt(1, 'nlgeo', 2, _f_array) # PYCHOK shared 

26_lat_corr = _v_grid_txt(1, 'rdcorr', 2, _d_array, _0s=89642) # PYCHOK shared 

27_lon_corr = _v_grid_txt(1, 'rdcorr', 3, _d_array, _0s=89433) # PYCHOK shared