Added a function to insert the inactivity periods into the data to create a continuous data file