Skip to content
Snippets Groups Projects
Commit 1b0fc691 authored by David P. Mayer's avatar David P. Mayer
Browse files

Generalized read_gpf to handle all styles of GPF used in Socet GXP, updated corresponding test data

parent b8c57dfe
No related branches found
No related tags found
No related merge requests found
point_id,use,point_type,lat_Y_North,long_X_East,ht,sig0,sig1,sig2,res0,res1,res2,eigenval0,eigenvec0_i,eigenvec0_j,eigenvec0_k,eigenval1,eigenvec1_i,eigenvec1_j,eigenvec1_k,eigenval2,eigenvec2_i,eigenvec2_j,eigenvec2_k
ESP_011969_1425_REDmos_hijitreged_1,1,0,-37.52498315102231,-168.0378101351008,2166.8567751754185,0.0,0.0,0.0,0.0,0.0,0.0,0.010015,0.991258,-0.131935,-0.000733,0.017375,0.126817,0.951241,0.281173,103723.422751,0.036399,0.278808,-0.959657
ESP_011969_1425_REDmos_hijitreged_10,1,0,-37.48836252421589,-168.12422875299504,2312.543966226925,0.0,0.0,0.0,0.0,0.0,0.0,0.009305,0.991449,-0.130497,-0.000525,0.017207,0.125904,0.955474,0.266867,102962.141334,0.034324,0.264651,-0.963733
ESP_011969_1425_REDmos_hijitreged_10,1,0,-37.48836252421589,-168.12422875299504,2312.543966226925,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
ESP_011969_1425_REDmos_hijitreged_12,1,0,-37.43168328052415,-168.06327026184894,561.0852310104716,0.0,0.0,0.0,0.0,0.0,0.0,0.009124,0.99128,-0.131771,-0.000682,0.017542,0.126781,0.952304,0.277567,105846.550937,0.035926,0.275233,-0.960706
ESP_011969_1425_REDmos_hijitreged_13,1,0,-37.43513301191926,-168.0950838309726,846.8487925744189,0.0,0.0,0.0,0.0,0.0,0.0,0.008751,0.99136,-0.131167,-0.000616,0.01745,0.126384,0.95393,0.272111,105280.729204,0.035105,0.269838,-0.962266
ESP_011969_1425_REDmos_hijitreged_14,1,0,-37.43831722012688,-168.11377673673576,1129.5974084590293,0.0,0.0,0.0,0.0,0.0,0.0,0.008804,0.991405,-0.130827,-0.000569,0.01738,0.126158,0.954852,0.268963,104835.518938,0.034644,0.266723,-0.96315
......
......@@ -32,9 +32,6 @@ ESP_011969_1425_REDmos_hijitreged_10 1 0
-37.48836252421589 -168.12422875299504 2312.54396622692502
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000
0.009305 0.991449 -0.130497 -0.000525
0.017207 0.125904 0.955474 0.266867
102962.141334 0.034324 0.264651 -0.963733
ESP_011969_1425_REDmos_hijitreged_12 1 0
-37.43168328052415 -168.06327026184894 561.08523101047160
......
......@@ -243,12 +243,18 @@ def read_gpf(input_data,gxp=False):
d = np.genfromtxt(input_data, skip_header=(l+1), dtype='unicode')
d = d.reshape(-1, len(columns))
else:
# Read GXP-style GPF a block at a time
lmax=( (l+1) + ((cnt-1)*8) + 2 )
for x in range(l+1,lmax,8):
x = l+1
for pt_idx in range(1, cnt+1):
# Read the first 4 lines of the point
a = np.genfromtxt(input_data, skip_header=(x), max_rows=4, dtype='unicode')
b = np.genfromtxt(input_data, skip_header=(x+4), max_rows=3, dtype='unicode')
if x == (l+1):
if getline(input_data,x+5) in ['\n','\r\n']:
b = np.zeros(12)
x = x+5
else:
b = np.genfromtxt(input_data, skip_header=(x+4), max_rows=3, dtype='unicode')
x = x+8
if pt_idx == 1 :
d = np.hstack([np.hstack(a),np.hstack(b)])
else:
d = np.vstack(( d, np.hstack([np.hstack(a),np.hstack(b)])) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment