cwitools.utils.find_files

cwitools.utils.find_files(id_list, datadir, cubetype, depth=3)

Finds the input files given a CWITools parameter file and cube type.

Parameters:
  • id_list (list) – A list of unique identifer sub-strings, such as an image number for PCWI data cubes (e.g. 34782) or a date_number string for KCWI data cubes (e.g. 190203_00072)
  • datadir (str) – The upper-level directory (or directories, separated by ‘;’) to search.
  • cubetype (str) – The type of CWI data cube to load for each unique ID (i.e. the file extension, such as “icubes.fits”). Must end in “.fits”
  • depth (int) – The number of directory levels down from the given datadir to search for cubes
Returns:

List of file paths of input cubes.

Return type:

list

Raises:

NotADirectoryError – If the input directory does not exist.