PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

Feature for trivial or custom instrument pack #272

Open drvdputt opened 8 months ago

drvdputt commented 8 months ago

PAHFIT can currently not work without specifying an instrument pack. This is a problem for cases where there is no reasonable instrument.

Example use case: seeing how a PAHFIT decomposition behaves, when fitted to a theoretical dust feature spectrum, for which the resolution of the grid is an arbitrary choice.

Perhaps a sort of 'trivial' instrument pack can be set up, with a fixed resolution and a user-specified range. At a minimum, it should be possible to read an instrument pack from the working directory of the user. They could then make a copy of a trivial instrument pack example, and adjust the wavelength range and resolution as needed

liztino commented 8 months ago

I made a very simple instrument pack to work on Draine+ 2021 models by calculating the R from the sampling of the model.

draine21: range: [1.0056, 40.054] coefficients: [220]

Not sure if this is helpful, but other folks may have a similar use case.

jdtsmith commented 4 months ago

I have some notes about a custom Instrument class, which users can use to craft their own simple instrument packs, if they so desire. This is a good idea down the road, and will be especially powerful with Model.tabulate: fit a (physical) model, then "reproject" it into a different instrument space. This is probably also a good reason to allow the instrument keyword to co-exist with (and override) the sp.meta['instrument'] Spectrum1D information.