Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Fixes tabulation error
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort committed Jul 31, 2019
1 parent ebceabc commit 615a8c4
Show file tree
Hide file tree
Showing 3 changed files with 4,805 additions and 4,803 deletions.
8 changes: 5 additions & 3 deletions analysis/equivalent_width/_calc_ew.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def create_pew_summary_table(models):

# First row represents observed data
model_names = [f'{m.source.name}' for m in models]
model_versions = [f'{m.source.name}' for m in models]
model_versions = [f'{m.source.version}' for m in models]
out_table = Table(
data=[['OBSERVED'] + model_names, [''] + model_versions],
names=['model', 'version'],
Expand Down Expand Up @@ -190,8 +190,10 @@ def tabulate_pew_spectrum(time, wave, flux, models, fix_boundaries):

# Calculate pew for models
for model in models:
# Shift time to beginning of explosion
t0 = model.source.peakphase('csp_dr3_B')
model_pew_results = calc_pew(
wave, model.flux(time, wave), feature, feat_start, feat_end)
wave, model.flux(time - t0, wave), feature, feat_start, feat_end)

pew_data.append(model_pew_results)

Expand Down Expand Up @@ -232,7 +234,7 @@ def tabulate_pew(data_release, models, fix_boundaries, verbose=True):
for model in models:
model.set(extebv=get_csp_ebv(obj_id))

# Todo: I'm not convinced this is the right thing to do
# Shift observed time to B-band peak
time -= get_csp_t0(obj_id)

except ValueError:
Expand Down
Loading

0 comments on commit 615a8c4

Please sign in to comment.