Created
April 23, 2018 22:16
-
-
Save jreadey/94f34406a6d6a5449b01b6e267f3e348 to your computer and use it in GitHub Desktop.
CAT sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import h5pyd as h5py | |
# Display content from sample CAT gh5 file | |
f = h5py.File("hdf5://home/john/CAT/sample.h5") | |
tv_grp = f["/DYNAMIC DATA/HEX_336X_GPS_messages_T4i_007.0/GPS_message_trig 1/TIME/TIME VECTORS"] | |
print("tv_grp id: {}".format(tv_grp.id.id)) | |
grnd_speed = tv_grp["GPRMC GroundSpeed/MEASURED"] | |
print("GroundSpeed/MEASURED shape: {}".format(grnd_speed.shape)) | |
grnd_speed_arr = grnd_speed[:] | |
global_time = tv_grp["GLOBAL_TIME/MEASURED"] | |
global_time_arr = global_time[:] | |
print("Index\tTime\t\tSpeed") | |
# Print last 10 rows of data | |
num_rows = 10 | |
row_start = grnd_speed.shape[0] - num_rows | |
for i in range(num_rows): | |
print("{}:\t{}\t{}".format(i+row_start, global_time_arr[i+row_start], grnd_speed_arr[i+row_start])) | |
print("GroundSpeed/MEASURED min: {} max: {}".format(grnd_speed_arr.min(), grnd_speed_arr.max())) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment