Skip to content

Commit

Permalink
various changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wkerzendorf committed Oct 6, 2017
1 parent b604d6f commit 3813aed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ include README.rst
include ez_setup.py
include ah_bootstrap.py
include setup.cfg

include wsynphot/data/calibration/*.fits
recursive-include wsynphot/data/*
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
Expand Down
4 changes: 2 additions & 2 deletions wsynphot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

# For egg_info test builds to pass, put package imports here.
if not _ASTROPY_SETUP_:
from base import BaseFilterCurve, FilterCurve, FilterSet, MagnitudeSet
from calibration import get_vega
from wsynphot.base import BaseFilterCurve, FilterCurve, FilterSet, MagnitudeSet
from wsynphot.calibration import get_vega
8 changes: 5 additions & 3 deletions wsynphot/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def calculate_filter_flux_density(spectrum, filter):

filtered_spectrum = filter * spectrum

return np.trapz(filtered_spectrum.flux, filtered_spectrum.wavelength)

filter_flux_density = np.trapz(filtered_spectrum.flux * filtered_spectrum.wavelength,
filtered_spectrum.wavelength)
return filter_flux_density

def calculate_vega_magnitude(spectrum, filter):
filter_flux_density = calculate_filter_flux_density(spectrum, filter)
Expand Down Expand Up @@ -232,7 +233,8 @@ def calculate_wavelength_delta(self):
:return:
"""

return np.trapz(self.transmission_lambda, self.wavelength)
return np.trapz(self.transmission_lambda * self.wavelength,
self.wavelength)

def calculate_weighted_average_wavelength(self):
"""
Expand Down

0 comments on commit 3813aed

Please sign in to comment.