Skip to content

Commit

Permalink
fix error in mocking data
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Jan 7, 2025
1 parent 6ea3a12 commit 9b65467
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions measure_extinction/utils/make_obsdata_from_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,6 @@ def make_obsdata_from_model(
# dictionary to saye names of spectroscopic filenames
specinfo = {}

full_file = "%s_full.fits" % (output_filebase)
if not only_dat:
# save the full spectrum to a binary FITS table
otable = QTable()
otable["WAVELENGTH"] = Column(wave_rebin, unit=u.angstrom)
otable["FLUX"] = Column(flux_rebin, unit=fluxunit)
otable["SIGMA"] = Column(flux_rebin * 0.01, unit=fluxunit)
otable["NPTS"] = Column(npts_rebin)
otable.write("%s/Models/%s" % (output_path, full_file), overwrite=True)
specinfo["MODEL_FULL"] = full_file

# rebin to R=100 for speed of reddened photometry calculation
# use a wavelength range that spans FUSE to Spitzer IRS
rbres_lowres = 100.0
Expand All @@ -319,14 +308,25 @@ def make_obsdata_from_model(
full_file_lowres = "%s_full_lowres.fits" % (output_filebase)
if not only_dat:

Check warning on line 309 in measure_extinction/utils/make_obsdata_from_model.py

View check run for this annotation

Codecov / codecov/patch

measure_extinction/utils/make_obsdata_from_model.py#L308-L309

Added lines #L308 - L309 were not covered by tests
# save the full spectrum to a binary FITS table
otable = QTable()
otable["WAVELENGTH"] = Column(wave_rebin_lowres, unit=u.angstrom)
otable["FLUX"] = Column(flux_rebin_lowres, unit=fluxunit)
otable["SIGMA"] = Column(flux_rebin_lowres * 0.01, unit=fluxunit)
otable["NPTS"] = Column(npts_rebin_lowres)
otable.write("%s/Models/%s" % (output_path, full_file_lowres), overwrite=True)
otable_lowres = QTable()
otable_lowres["WAVELENGTH"] = Column(wave_rebin_lowres, unit=u.angstrom)
otable_lowres["FLUX"] = Column(flux_rebin_lowres, unit=fluxunit)
otable_lowres["SIGMA"] = Column(flux_rebin_lowres * 0.01, unit=fluxunit)
otable_lowres["NPTS"] = Column(npts_rebin_lowres)
otable_lowres.write("%s/Models/%s" % (output_path, full_file_lowres), overwrite=True)
specinfo["MODEL_FULL_LOWRES"] = full_file_lowres

Check warning on line 317 in measure_extinction/utils/make_obsdata_from_model.py

View check run for this annotation

Codecov / codecov/patch

measure_extinction/utils/make_obsdata_from_model.py#L311-L317

Added lines #L311 - L317 were not covered by tests

full_file = "%s_full.fits" % (output_filebase)

Check warning on line 319 in measure_extinction/utils/make_obsdata_from_model.py

View check run for this annotation

Codecov / codecov/patch

measure_extinction/utils/make_obsdata_from_model.py#L319

Added line #L319 was not covered by tests
if not only_dat:
# save the full spectrum to a binary FITS table
otable = QTable()
otable["WAVELENGTH"] = Column(wave_rebin, unit=u.angstrom)
otable["FLUX"] = Column(flux_rebin, unit=fluxunit)
otable["SIGMA"] = Column(flux_rebin * 0.01, unit=fluxunit)
otable["NPTS"] = Column(npts_rebin)
otable.write("%s/Models/%s" % (output_path, full_file), overwrite=True)
specinfo["MODEL_FULL"] = full_file

Check warning on line 328 in measure_extinction/utils/make_obsdata_from_model.py

View check run for this annotation

Codecov / codecov/patch

measure_extinction/utils/make_obsdata_from_model.py#L327-L328

Added lines #L327 - L328 were not covered by tests

iue_file = "%s_iue.fits" % (output_filebase)
if not only_dat:
# IUE mock observation
Expand Down

0 comments on commit 9b65467

Please sign in to comment.