Open gdcteixeira opened 6 years ago
The error seems to come from the filter.read() function.
I got around it by using the following:
data = np.loadtxt('Herschel_Pacs.blue.dat', skiprows=1)
wav = data[:,0]
response = data[:,1]
title_data = np.genfromtxt('Herschel_Pacs.blue.dat', dtype=str, comments=None, skip_footer=len(response) )
hersh_pacs_70 = Filter()
hersh_pacs_70.name = 'pacs70'
hersh_pacs_70.central_wavelength = float(title_data[-1])* u.micron
hersh_pacs_70.nu = wav *u.GHz
hersh_pacs_70.response = response
hersh_pacs_70.normalize()
model_dir = '../models_sed_fit/models_r06'
convolve_model_dir(model_dir, [hersh_pacs_70])
Notice that the file used was an ascii file with the first line of the type
# wav = 70
and then 2 columns, the first with the frequencies in GHz and the second with the response.
I'll try to look into what can be causing the filter.read() problem.
Did you get reasonable fitting results with this approach? My understanding was that the Herschel filter response functions needed to be normalized by integration over frequency since Herschel passbands refer to constant energy spectrum nu*Fnu = constant. So I thought they should be normalized according to Appendix A of Robitaille et al did for IRAC. http://iopscience.iop.org/article/10.1086/512039/fulltext/
I have not had sensible results with my own attempt at Herschel (and Gaia) convolution and fitting.
I've recently started to try to use the python version of the sed fitting tool, and I need to add herschel and Atlasgal filters.
I've tried to follow the documents and the issues raised in the sedfitter github page. But i've hit a roadblock.
What i'm using is his:
I took the Hershel transmission curve from the Virtual observatory, converted the wavelenghts into microns, ordered from bigger wavelength to lower and added the #wave to the header. The Herschel file is something like this:
Unfortunately when i run the script I end up with the following error:
Do you know what I'm missing? Do I still need to define nu despite reading the transmission from the file?