to_filename_strings

ndmapper.utils.to_filename_strings(objects, strip_names=True, strip_dirs=True, use_cal_dict=False)[source] [edit on github]

Extract a list of filename strings from one or more str, FileName or DataFile objects (or a DataFileList), by default removing any path and processing suffix/prefixes. A calibration dictionary may also be given, in the format produced by calibrations.init_cal_dict(), if the relevant option is enabled. It is the caller’s responsibility to ensure that the string values are actually valid filenames.

This is typically used to reproduce base filenames for use in either downloading or looking up external information about the files.