gcfit.util.get_cluster_path#
- gcfit.util.get_cluster_path(name, standardize_name=True, restrict_to=None)#
Based on a cluster name, return path to the corresponding cluster file.
Given a cluster name, search the relevant directories for the corresponding cluster data file and return the path to said file.
Cluster files can exist as ‘core’ clusters, standardized and constant within the package itself, or as ‘local’ clusters, created by the user and stored within the GCFIT_DIR directory. Searches for cluster files will begin with local files, and then core files if no matching local files are found. If a specific location is desired, the search can be restricted to one or the other.
- Parameters:
- namestr
Cluster name.
- standardize_namebool, optional
If True (default) pass the cluster name through get_std_cluster_name before searching for the matching file. Searches for core clusters will always be standardized, no matter this parameter.
- restrict_to{None, ‘local’, ‘core’}
Where to restrict file searches to. By default (None) searches local first, then core if no matching local files are found.
- Returns:
- pathlib.Path
Path to corresponding cluster HDF data file.