FilterFile

class eazy.filters.FilterFile(file='FILTER.RES.latest', path='./')[source]

Bases: object

Read a EAZY filter file.

import matplotlib.pyplot as plt
from eazy.filters import FilterFile

res = FilterFile(path=None)
print(len(res.filters))

bp = res[205]
print(bp)

fig, ax = plt.subplots(1,1,figsize=(6,4))

ax.plot(bp.wave, bp.throughput, label=bp.name.split()[0])

ax.set_xlabel('wavelength, Angstroms')
ax.set_ylabel('throughput')
ax.legend()
ax.grid()

fig.tight_layout(pad=0.5)

(Source code)

Attributes Summary

NFILT

Number of filters in the list

Methods Summary

names([verbose])

Print the filter names.

search(search_string[, case, verbose])

Search filter names for search_string.

write([file, verbose])

Dump the filter information to a filter file.

Attributes Documentation

NFILT

Number of filters in the list

Methods Documentation

names(verbose=True)[source]

Print the filter names.

search(search_string, case=False, verbose=True)[source]

Search filter names for search_string. If case is True, then match case.

write(file='xxx.res', verbose=True)[source]

Dump the filter information to a filter file.