FURTHResearch
  • FURTHRmind
  • RESEARCH DATA HANDLING
  • ABOUT
  • SUPPORT
  • JOBS
  • CONTACT

How to create a script used for data read-in?

Write a python script that contains a method called "readIn" with five input arguments:
  • filePath: string, the file path of the selected file to read-in
  • dataObjceExp: An data object representing the referred experiment
  • dataObjectSample: An data object representing the referred sample
  • dataObjectGroup: An data object representing the referred group
  • Utility: instance of the Utility class. Find the documentation here.
Every dataObject has the methods: getValueByFieldName and getUnitByFieldName, which returns a dataObjectUnit (or None if not set). This unit object has the methods convertToSI and convertToCertainUnit, where you have to pass the ShortName of an existing unit.

During read-in this method will be called. You can define other classes and other method that can be called from the readIn method. 

The script must return a list that contain dictionaries. One dict for each Column. Each dict must have the following keys:
  • Name: The value is the name of the column, string
  • Type: Must be string out of: "Text", "Date", "Numeric", "Bool" 
  • UnitID: In case that Type is "Numeric", you can specify the Unit of the column. You have to parse the _id of the Unit. The Unit can be retrieved by calling Utility.getUnitByShortName(shortName)
  • Data: Lists in a List. Each list in this list represents the data of one step. The content of each list must fit to the selected Type.

You can use all standard python modules plus the following packages:
To interact with classical data files:
  • csv, pyexcel, pyexcel_ods, pyexcel_xlsx, pyexcel_xls, pyexcel_io, openpyxl
To process data:
  • numpy
If you need more packages, just let us now and will add them to the list of supported packages. 

Downloads


Imprint

Terms and conditions

Privacy

  • FURTHRmind
  • RESEARCH DATA HANDLING
  • ABOUT
  • SUPPORT
  • JOBS
  • CONTACT