Skip to content

Commit

Permalink
Updated extract_sed() to handle scenes with no normalization
Browse files Browse the repository at this point in the history
The routine will return the flux as expected at a distance of Rs
as it is typical of many models.
  • Loading branch information
pcubillos committed Apr 4, 2024
1 parent 166db95 commit 3f2c1cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gen_tso/pandeia_io/pandeia_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ def extract_sed(scene, wl_range=None):
webapp=True,
)
wave, flux = normalization.normalize(sed_model.wave, sed_model.flux)
if normalization.type == 'none':
if sed_model.sed_type in ['phoenix', 'k93models']:
# Convert wavelengths from A to um:
wave *= 1e-4 # pc.A / pc.um
if sed_model.sed_type == 'blackbody':
# Convert blackbody intensity to flux:
flux *= np.pi

if wl_range is None:
wl_mask = np.ones(len(wave.value), bool)
Expand Down

0 comments on commit 3f2c1cf

Please sign in to comment.