astrofrog / sedfitter

Python version of the SED fitter from Robitaille et al., 2007, ApJS 169 328
http://sedfitter.readthedocs.org
BSD 2-Clause "Simplified" License
20 stars 22 forks source link

error when defining filters as wavelengths only #81

Open Tsteinmetz98 opened 8 months ago

Tsteinmetz98 commented 8 months ago

Hello, I am fitting an SED and, rather than having defined the filters to convolve with the models I have just defined the set of wavelengths that the data was observed at. The definitions are in the form filters=[4.64000e-01u.micron, 5.51000e-01u.micron, 2.15000e+00u.micron, 3.40000e+00u.micron, 3.77000e+00*u.micron...]

I run the fitting module via the code fit('', filters, apertures, modeldir_kurucz, 'kurucz_output.txt', extinction_law=extinction, distance_range=[8., 9.]*u.kpc,av_range=[1.55,6.2])

the output I get is the following error:

File "/home/thomas/Software/venv/lib/python3.11/site-packages/sedfitter/fit.py", line 180, in fit fitter = Fitter(filter_names, apertures, model_dir, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/thomas/Software/venv/lib/python3.11/site-packages/sedfitter/fit.py", line 86, in init self.models = Models.read(model_dir, self.filters, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/thomas/Software/venv/lib/python3.11/site-packages/sedfitter/models.py", line 142, in read return cls._read_version_1(directory, filters, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/thomas/Software/venv/lib/python3.11/site-packages/sedfitter/models.py", line 190, in _read_version_1 filename = '%s/convolved/%s.fits' % (directory, filt['name'])


KeyError: 'name'

I don't want to use any of the provided filters but only want to use the wavelengths of the data. Is there a workaround for this?