Commit b226bd09 authored by Médéric Boquien's avatar Médéric Boquien

Dynamically adapt the wavelength range in SED plots

parent 7819a195
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
### Added ### Added
- The (1+z1)/(1+z2) factor between observed and grid flux densities caused by the differential redshifting is now taken into account. With a default grid redshift rounding of two decimals this yields a difference of at most 0.5% in the estimated physical properties at z=0 and even less at higher z. (Médéric Boquien) - The (1+z1)/(1+z2) factor between observed and grid flux densities caused by the differential redshifting is now taken into account. With a default grid redshift rounding of two decimals this yields a difference of at most 0.5% in the estimated physical properties at z=0 and even less at higher z. (Médéric Boquien)
### Changed ### Changed
- The logo has now been moved to the lower-right corner of the figure so that it does not overlap with any information and it has been updated for a less pixelated version (Médéric Boquien & Rodrigo González Castillo) - The logo has now been moved to the lower-right corner of the figure so that it does not overlap with any information and it has been updated for a less pixelated version. (Médéric Boquien & Rodrigo González Castillo)
- The wavelength range in SED plots is now dynamically adapted to cover the observed wavelengths. (Médéric Boquien)
### Fixed ### Fixed
- Make sure we can plot the PDF of equivalent widths. (Médéric Boquien) - Make sure we can plot the PDF of equivalent widths. (Médéric Boquien)
- Fix a crash when generating a mock catalogue containing intensive properties. (Médéric Boquien) - Fix a crash when generating a mock catalogue containing intensive properties. (Médéric Boquien)
......
...@@ -28,10 +28,6 @@ from pcigale.analysis_modules.utils import Counter, nothread ...@@ -28,10 +28,6 @@ from pcigale.analysis_modules.utils import Counter, nothread
BEST_RESULTS = "results.fits" BEST_RESULTS = "results.fits"
MOCK_RESULTS = "results_mock.fits" MOCK_RESULTS = "results_mock.fits"
# Wavelength limits (restframe) when plotting the best SED.
PLOT_L_MIN = 0.1
PLOT_L_MAX = 5e5
AVAILABLE_SERIES = [ AVAILABLE_SERIES = [
'stellar_attenuated', 'stellar_attenuated',
'stellar_unattenuated', 'stellar_unattenuated',
...@@ -129,8 +125,8 @@ def _sed_worker(obs, mod, filters, sed_type, logo, xrange, yrange, series, forma ...@@ -129,8 +125,8 @@ def _sed_worker(obs, mod, filters, sed_type, logo, xrange, yrange, series, forma
z = mod['best.universe.redshift'] z = mod['best.universe.redshift']
DL = mod['best.universe.luminosity_distance'] DL = mod['best.universe.luminosity_distance']
xmin = PLOT_L_MIN if xrange[0] is False else xrange[0] xmin = 0.9 * np.min(filters_wl) if xrange[0] is False else xrange[0]
xmax = PLOT_L_MAX if xrange[1] is False else xrange[1] xmax = 1.1 * np.max(filters_wl) if xrange[1] is False else xrange[1]
if sed_type == 'lum': if sed_type == 'lum':
k_corr_SED = 1e-29 * (4.*np.pi*DL*DL) * c / (filters_wl*1e-9) k_corr_SED = 1e-29 * (4.*np.pi*DL*DL) * c / (filters_wl*1e-9)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment