bd-j / sedpy

Utilities for astronomical spectral energy distributions
https://sedpy.readthedocs.io/en/latest/
MIT License
28 stars 16 forks source link

Allow specifying filter data on Filter init #9

Closed gbrammer closed 7 years ago

gbrammer commented 7 years ago

I pulled out the code that cleans up the filter transmission curve into a new private method, which also now allows you to specify the throughput information directly on initialization rather than requiring files.

For example:

>>> from sedpy.observate import Filter
>>> import pysynphot as S
>>> 
>>> f160_sedpy = Filter(kname='wfc3_ir_f160w')
>>> f160 = S.ObsBandpass('wfc3,ir,f160w')
>>> f160_data = Filter(nick='f160w', data=[f160.wave, f160.throughput])
>>> 
>>> print(f160_sedpy.wave_pivot, f160_data.wave_pivot, f160.pivot())
15368.9009759 15369.1687471 15369.175708965562
bd-j commented 7 years ago

awesome, thanks @gbrammer!