Skip to content

A python library to process reference data usefull for my projects.

License

Notifications You must be signed in to change notification settings

marickmanrho/ToCM_reference_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToCM_reference_data

A python library to process reference data usefull for my projects.

How to

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)

Library management

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.

Creating 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.

Adding / removing a library

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]

About

A python library to process reference data usefull for my projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages