Skip to content
Snippets Groups Projects
Commit 4e8ed38b authored by David P. Mayer's avatar David P. Mayer Committed by Trent Hare
Browse files

Typo fixes in io_gpf.py (#22)

* Typo fixes in io_gpf.py. Column labels now match case of headers in Socet Set spec for GPF files.

* More typo fixes for GPF column labels in IO script and test data
parent badb7908
No related branches found
No related tags found
No related merge requests found
point_id,stat,known,lat_y_North,long_X_East,ht,sigma0,sigma1,sigma2,res0,res1,res2 point_id,stat,known,lat_Y_North,long_X_East,ht,sigma0,sigma1,sigma2,res0,res1,res2
1,1,1,0.08538133869186999,2.38013146162178,-2697.2374469465,0.0,0.0,1.707214,16.348041000000002,-13.917623,-0.151001 1,1,1,0.08538133869186999,2.38013146162178,-2697.2374469465,0.0,0.0,1.707214,16.348041000000002,-13.917623,-0.151001
2,1,1,0.08508542650082002,2.3808135855714703,-2702.0,0.0,0.0,1.0,15.983285999999998,-16.869508,0.103341 2,1,1,0.08508542650082002,2.3808135855714703,-2702.0,0.0,0.0,1.0,15.983285999999998,-16.869508,0.103341
3,1,1,0.08626480095809,2.3870838392611,-2714.16003756809,0.0,0.0,3.828854,12.831839,-34.360639,-2.2058459999999998 3,1,1,0.08626480095809,2.3870838392611,-2714.16003756809,0.0,0.0,3.828854,12.831839,-34.360639,-2.2058459999999998
......
...@@ -13,7 +13,7 @@ def read_gpf(input_data): ...@@ -13,7 +13,7 @@ def read_gpf(input_data):
Returns Returns
------- -------
df : pd.DataFrame df : pd.DataFrame
containing the gfp data with appropriate column names and indices containing the gpf data with appropriate column names and indices
""" """
# Check that the number of rows is matching the expected number # Check that the number of rows is matching the expected number
...@@ -32,7 +32,7 @@ def read_gpf(input_data): ...@@ -32,7 +32,7 @@ def read_gpf(input_data):
#TODO: cols should be used to dynamically generate the column names #TODO: cols should be used to dynamically generate the column names
df = pd.DataFrame(d, columns=['point_id', 'stat', 'known', df = pd.DataFrame(d, columns=['point_id', 'stat', 'known',
'lat_y_North', 'long_X_East','ht', 'lat_Y_North', 'long_X_East','ht',
'sigma0', 'sigma1', 'sigma2', 'sigma0', 'sigma1', 'sigma2',
'res0', 'res1', 'res2']) 'res0', 'res1', 'res2'])
...@@ -80,7 +80,7 @@ def save_gpf(df, output_file): ...@@ -80,7 +80,7 @@ def save_gpf(df, output_file):
for index,row in df.iterrows(): for index,row in df.iterrows():
#Output coordinates to gpf file #Output coordinates to gpf file
outGPF.write('{0} {1} {2}\n'.format(row['point_id'], row['stat'], row['known'])) outGPF.write('{0} {1} {2}\n'.format(row['point_id'], row['stat'], row['known']))
outGPF.write('{0} {1} {2}\n'.format(row['lat_y_North'], row['long_X_East'], row['ht'])) outGPF.write('{0} {1} {2}\n'.format(row['lat_Y_North'], row['long_X_East'], row['ht']))
outGPF.write('{0} {1} {2}\n'.format(row['sigma0'], row['sigma1'], row['sigma2'])) outGPF.write('{0} {1} {2}\n'.format(row['sigma0'], row['sigma1'], row['sigma2']))
outGPF.write('{0} {1} {2}\n\n'.format(row['res0'], row['res1'], row['res2'])) outGPF.write('{0} {1} {2}\n\n'.format(row['res0'], row['res1'], row['res2']))
......
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