pyspecdata.datadir

Allows the user to run the same code on different machines, even though the location of the raw spectral data might change.

This is controlled by the ~/.pyspecdata or ~/_pyspecdata config file.

Functions

dirformat(file)

getDATADIR(*args, **kwargs)

Used to find a directory containing data in a way that works seamlessly across different computers (and operating systems).

get_notebook_dir(*args)

Returns the notebook directory.

grab_data_directory()

log_fname(logname, fname, dirname, exp_type)

logs the file name either used or missing into a csv file.

proc_data_target_dir(exp_type)

A convenience function for getting a data directory you're going to write data to.

rclone_search(fname, exp_type, dirname)

register_directory()

The shell command pyspecdata_register_dir WHICHDIR will register the directory WHICHDIR (substitute with the name of a directory on your computer) so that it can be automatically discovered by find_file() or search_filename() after executing this shell command you can use the exp_type argument of those commands where you only give the lowest level subdirectory (or the final couple subdirectories) that contains your data.

Classes

MyConfig()

Provides an easy interface to the pyspecdata configuration file.

cached_searcher()