What PIGOR does

PIGOR (‘Python IGOR’ = PIGOR) aims to help physicists on the NEPTUN beamline to quickly extract the needed information when measuring and configuring or preparing an experiment. It will go through all files in its root folder and will continue to look for files in all subdirectories recursively as well. It will then auto detect [1] the type of measurement and guess what the user wants to know. After analysis of all files, additional files will show up alongside the original measurement files:

  • .png file: plot of the data
  • .md file: usefull information gathered about the measurement in plain text as markdown
  • .html file: same content as the markdown file, but nicely viewable in a modern browser
[1]This will only work if the correct naming convention is used.

PIGORs inner workings


Analyses all given files in list. This function can be used by the command [a].

Parameters:filepaths – list of files to analyse with their relative dir path added


Change to no override mode. measurement.Measurement.plot(override=False)


a + today => only analyse files for today


a + override => override=True


Converts a boolean to yes or no with the mapping: y = True, n = False.


Creates an index.html listing all directories and subdirectories and their HTML and Markdown files. If a default browser is found, it will automatically open index.html. This function can be used by the command [j].


Finds all dat files recursively in all subdirectories ignoring hidden directories and Python specific ones.

Returns a list of filepaths.


This function will read the config file and initialize some variables accordingly. This function can be used by the command [i].

Available options:

  • root directory where PIGOR will start to look for measurement files
  • Should PIGOR look for files to analyse recursively?
  • Which file extention do the measurement files posess?
  • What plot output format should PIGOR use?
  • Should PIGOR automatically create an html file?
  • Should PIGOR automatically create a md file?
  • Should PIGOR create a txt file containing all used fit functions for the use in Mathematica?


If no config file can be found, it will create one.


Checks if this theme exists.


Returns a list of all themes available.


Main Loop


This function prints a beautiful header followed by one empty line.

Parameters:text – text to be displayed as header

Prints a help menu on the screen for the user. This function can be used by the command [h].

Parameters:display – specify the lenght of the help menu, options are ‘all’ or ‘quick’ (Default value = “all”)

Prints the root for PIGOR, e.g. where it will look for files to analyse. This function can be used by the command [x].


Removes the generated png, html and md files. This function can be used by the command [r].

Parameters:files – list of Path objects to files that should be removed; if set to ‘all’ it will delete all generated files (Default value = ‘all’)


Cover the case when files are not a list of path, e.g. wrong input given.


Register a function to be displayed to the user as an option


Converts yes and no to True and False.