-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from jason-neal/develop
Get docs branch up to date with develop.
- Loading branch information
Showing
8 changed files
with
209 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#sync | ||
.sync/ | ||
|
||
#notebook and html | ||
#*.ipynb | ||
*.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pyastronomy | ||
numpy | ||
astropy | ||
scipy | ||
hypothesis | ||
pytest | ||
pytest-cov | ||
python-coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Differential Class which takes the difference between two spectral types.""" | ||
from spectrum_overload.Spectrum import Spectrum | ||
# Begin Feburary 2017 | ||
|
||
|
||
class DifferentialSpectrum(object): | ||
"""Make differential spectrum.""" | ||
|
||
def __init__(self, Spectrum1, Spectrum2): | ||
"""Initalise lass with both spectra.""" | ||
if not(Spectrum1.calibrated and Spectrum2.calibrated): | ||
raise ValueError("Input spectra are not calibrated.") | ||
|
||
self.spec1 = Spectrum1 | ||
self.spec2 = Spectrum2 | ||
self.params = None | ||
self.diff = None | ||
|
||
def barycentric_correct(self): | ||
"""Barycentic correct each spectra.""" | ||
pass | ||
|
||
def rest_frame(self, frame): | ||
"""Change restframe to one of the spectra.""" | ||
pass | ||
|
||
def diff(self): | ||
"""Calculate difference between the two spectra.""" | ||
# TODO: Access interpolations | ||
return self.spec1 - self.spec2 | ||
|
||
def sort(self, method="time"): | ||
"""Sort spectra in specific order. e.g. time, reversed.""" | ||
pass | ||
|
||
def swap(self): | ||
"""Swap order of the two spectra.""" | ||
self.spec1, self.spec2 = self.spec2, self.spec1 | ||
|
||
def add_orbital_params(self, params): | ||
"""Acecpt dictionary of orbital parameters to use for shifting frames.""" | ||
self.params = params |
Oops, something went wrong.