Getting startedΒΆ
Test the tool
You can test the tool very easy by using a sample data set that comes with the repository. For this you need to run the following code:
import sys
sys.path.append('/path_to_folder_directory_containing_the_mdf_reader_folder/')
import mdf_reader
import matplotlib.pyplot as plt
data = mdf_reader.tests.read_imma1_buoys_nosupp()
Read an IMMA file
Read a sample .imma
file from the folder ~/mdf_reader/test/data/
via the following code:
filepath = '~/mdf_reader/test/data/069-701_1845-04_subset.imma'
imma_data = mdf_reader.read(filepath, data_model = 'imma1',sections = ['core','c1','c98'])
For more details on how to run this in your python session see mdf_reader.read.main()
To call the function from a terminal type:
$ python mdf_reader_dir/read.py source data_model data_model_path sections chunksize skiprows out_path
For more details and an overview of the tool check out the following python notebook: