get_galaxy_filepath#
- get_galaxy_filepath(name, which='spectrum')[source]#
Get the path(s) to the spectrum and/or thumbnail files of a galaxy.
Files are looked for in the package data directory
PACKAGE_PATH.joinpath("data").- Parameters:
name (
str) – Galaxy name (case insensitive). Currently, only NGC galaxies are supported, given as"ngcXXXX"or"ngc_XXXX".which (
str, optional) – Which file(s) to return:"spectrum"(or"spec") for the spectrum file,"image"(or"thumbnail") for the thumbnail image file, or"both"for both. Default is"spectrum".
- Returns:
pathlib.Pathorlistofpathlib.Path– Path to the requested file if a single file is requested, otherwise the list[spectrum_path, image_path].
Examples
>>> spec, image = get_galaxy_filepath("NGC4321", which="both")