def prepare_data(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Preparing the input data into plottable format...")

        # Get the number of processes
        ranks = np.unique(self.table["Process rank"])

        assert len(ranks) == max(ranks) + 1
        processes = len(ranks)

        # Initialize the data structure to contain the memory usage information in plottable format
        self.data = [Map({"times": [], "memory": []}) for i in range(processes)]

        # Loop over the different entries in the memory table
        for i in range(len(self.table)):

            # Get the process rank
            rank = self.table["Process rank"][i]

            # Get the time and memory usage
            time = self.table["Simulation time"][i]
            memory = self.table["Memory usage"][i]

            # Add the data point to the data structure
            self.data[rank].times.append(time)
            self.data[rank].memory.append(memory)

        # Check whether (de)allocation information is present in the memory table
        if "Array (de)allocation" in self.table.colnames:

            # Initialize the data structure for plotting the memory usage of the root process and the memory
            # allocation curve
            self.allocation = Map({"times": [], "allocation": [], "cumulative": []})

            # Get the mask covering entries that do not contain array (de)allocation information
            mask = self.table["Array (de)allocation"].mask

            # Check whether the first entry of the table corresponds to the root process
            assert self.table["Process rank"][0] == 0

            # Create a variable to store the cumulative sum of allocated memory
            cumulative_sum = 0.0

            # Loop over the different entries in the memory table
            for i in range(len(self.table)):

                # Get the process rank
                rank = self.table["Process rank"][i]

                # Only add the contributions from the root process
                if rank > 0: break

                # If the entry is masked because it does not contain memory allocation information, skip it
                if mask[i]: continue

                # Get the time and the amount of (de)allocated memory
                time = self.table["Simulation time"][i]
                allocation = self.table["Array (de)allocation"][i]

                # Add the allocated memory to the sum
                cumulative_sum += allocation

                # Add the data point to the data structure
                self.allocation.times.append(time)
                self.allocation.allocation.append(allocation)
                self.allocation.cumulative.append(cumulative_sum)