diff --git a/README.md b/README.md index 06aae36..380842f 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,12 @@ If you make use of HostPhot, please cite the following [paper](https://joss.theo ``` ## What's new! +v2.10.0 +* SkyMapper upgrade from DR2 to DR4 (note that there is still a problem with the photometric calibration of extended sources) +* Change path handling package (os --> pathlib) +* Interactive aperture and download of RGB images have been removed and are no longer available +* Close some fits images that were previously kept opened + v2.9.0 * Fixing issue when applying/propagating common-mask parameters (e.g. from a coadd) to other images * Updated error propagation for Legacy Survey with inverse-variance maps (using it as a weight mask now) diff --git a/src/hostphot/sed_plotting.py b/src/hostphot/sed_plotting.py index 8095046..3629131 100644 --- a/src/hostphot/sed_plotting.py +++ b/src/hostphot/sed_plotting.py @@ -40,8 +40,8 @@ def get_eff_wave(filt, survey): if survey=='unWISE': survey = 'WISE' - survey_files = glob.glob(path.joinpath('filters', survey, '*')) - filt_file = [file for file in survey_files if file.endswith(f'_{filt}.dat')][0] + survey_files = path.joinpath('filters', survey).glob('*') + filt_file = [file for file in survey_files if str(file).endswith(f'_{filt}.dat')][0] wave, trans = np.loadtxt(filt_file).T eff_wave = np.sum(wave*trans)/np.sum(trans) @@ -85,9 +85,9 @@ def plot_sed(name, phot_type='global', z=None, radius=None, include=None, exclud assert radius is not None, "radius must be given with local photometry" global colours - obj_path = Path(workdir, name, '*') - phot_files = [file for file in glob.glob(obj_path) - if file.endswith(f'_{phot_type}.csv')] + obj_path = Path(workdir, name) + phot_files = [file for file in obj_path.glob('*') + if str(file).endswith(f'_{phot_type}.csv')] if include is not None and exclude is not None: raise ValueError("'inlcude' cannot be given together with 'exclude'!")