phangs_get_galaxy_allinfo.pro
594 Bytes
function phangs_get_galaxy_allinfo,galaxy,file=file
use_file=!dustem_wrap_soft_dir+'LabTools/IRAP/AH/phangs_sample_table_v1p6.fits'
if keyword_set(file) then use_file=file
ngals_in=n_elements(galaxy)
str=phangs_read_sample_table(file=use_file)
match,strtrim(strupcase(galaxy),2), strtrim(strupcase(str.name),2),lidx,galidx,count=found
if found eq 0 and ngals_in eq 1 then begin
message,'Galaxy: '+galaxy+' not found.',/info
stop
end
if found eq 0 and ngals_in gt 1 then begin
message,'No galaxies found.',/info
stop
end
return,str[galidx]
the_end:
end