Skip to content

Commit

Permalink
changing path handling plus other minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
temuller committed Apr 25, 2024
1 parent 6b53dd1 commit 038aaec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions src/hostphot/sed_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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'!")
Expand Down

0 comments on commit 038aaec

Please sign in to comment.