A python library to process reference data usefull for my projects.
This is a small code example of how this library works
import tocm_reference_data as ref
import matplotlib.pyplot as plt
for line in ref.Bondarenko_2020.figure1f.lines:
plt.plot(line.x, line.y, label=line.label)
plt.legend()
plt.show()
print(ref.Bondarenko_2020.metadata)
The package comes with a standard library from the Theory of Condensed matter group at the University of Groningen. Unfortunately we do not have the copyright to share other data. However, we made it easy to add your own references.
First you need to create a library folder.
mkdir mylibrary
In this library each reference should be contained in its own folder. The folder name will become the name of the reference when imported into tocm_reference_data
. The folder should at least contain three files:
[name]_fig[id].csv
[name]_reference.json
[name]_info.json
The first file *fig*.csv
is the data file containing the data of figure. Currently only .csv
filetypes are supported. The *reference.json
file contains the citation data of the corresponding figure. This file can be automatically generated by most bibliography software by exporting to .json
. The *info.json
file contains the paths to the data and reference files. For more details look at the files themselves.
The package allows you to manually add or remove a user generated library. This is done with the commands
tocm_reference_data --list-libraries
tocm_reference_data --add_library [absolute_path_to_library]
tocm_reference_data --remove_library [index of library as found with --list-libraries]