Skip to content
Snippets Groups Projects
Commit cb15dcd6 authored by Greg Quinn's avatar Greg Quinn
Browse files

Add text output to dump_planck_coeffs

parent 454740a2
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,16 @@ def dump_planck_coeffs(filename, srfs, bands=('M12', 'M13', 'M14', 'M15', 'M16',
lambda_ = np.empty([len(bands)], np.float64)
a = np.empty([len(bands), 3], np.float64)
for band_idx, band in enumerate(bands):
print band
srf = srfs[band]
srf.bright(np.array(0.0))
lambda_[band_idx] = srf.centroid
a[band_idx,:] = srf.monochrom_coeffs
print ' Wavelength:', srf.centroid
print ' a2:', srf.monochrom_coeffs[0]
print ' a1:', srf.monochrom_coeffs[1]
print ' a0:', srf.monochrom_coeffs[2]
print
with h5py.File(filename, 'w') as f:
f.create_dataset('Wavelength', data=lambda_)
f.create_dataset('Coefficients', data=a)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment