Example #1
0
    def parse(self, file_location):
        """
        Parses Gamp Files into a single list.

        Args:
            file_location (str): The location of the GAMP File.

        Returns:
            numpy.ndarray: A list containing all the GampEvents from the
                data file.
        """
        indexes = self.__index_gamp(file_location)
        reader = g_iterator.GampReader(file_location)
        events = numpy.zeros((indexes[0], indexes[1], 6), numpy.float64)

        for index, event in enumerate(reader):
            if not len(event) == indexes[1]:
                event = numpy.resize(event, (indexes[1], 6))
            events[index] = event

        reader.close()
        return events
Example #2
0
def test_GAMPReader_ResetReader_NoFail():
    reader = g_iterator.GampReader(GAMP_TEST_DATA)
    reader.reset()
Example #3
0
def test_GAMPReader_PreviousEvent_MatchesNext():
    reader = g_iterator.GampReader(GAMP_TEST_DATA)
    old = reader.next_event

    numpy.testing.assert_array_equal(old, reader.previous_event)
Example #4
0
 def get_plugin_reader(self, file_location):
     return g_iterator.GampReader(file_location)