1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Importing Data in Python

Exercise

Extracting data from your HDF5 file

In this exercise, you'll extract some of the LIGO experiment's actual data from the HDF5 file and you'll visualize it.

To do so, you'll need to first explore the HDF5 group 'strain'.

Instructions

100 XP
  • Assign the HDF5 group data['strain'] to group.
  • In the for loop, print out the keys of the HDF5 group in group.
  • Assign the time series data data['strain']['Strain'] to a NumPy array called strain.
  • Set num_samples equal to 10000, the number of time points we wish to sample.
  • Execute the rest of the code to produce a plot of the time series data in LIGO_data.hdf5.