Creating a Python DataPlugin
- Updated2024-09-12
- 2 minute(s) read
(Mining and Loading Data | Version 2020) > Creating a Python DataPlugin
Creating a Python DataPlugin |
The following example shows how you can load a simple CSV file with a Python DataPlugin. First register the DataPlugin in DIAdem and load Example.csv from the Examples folder. Open the Python file to see the basic structures of the Python DataPlugin:
- def read_store
This is the main function of the Python DataPlugin. This function converts the input file into a Python dictionary and adds the metadata as normal dictionary properties. - def read_channel_length
This method returns the channel length. - def read_channel_values
This method returns the mass data as one value field.
Click a filename to load this file into DIAdem.
| PyCSV_DataPlugin.py | Python script file for the DataPlugin |
| PyCSV_DataPlugin.uri | DataPlugin for CSV files. You can also register the DataPlugin in DIAdem by double-clicking the URI file in Explorer. |
| Example.csv | ASCII file. After registering the DataPlugin, you can load the file with the DataPlugin. |
![]() | Note When this example starts, DIAdem loads example files and overwrites existing data and layouts. |
![]() |
Note To deregister the DataPlugin, use DataPlugin Settings or click here. |
