Skip to content

Porting features from the Orion Bar paper branch#308

Open
drvdputt wants to merge 15 commits intoPAHFIT:devfrom
drvdputt:orion+galaxy_paper
Open

Porting features from the Orion Bar paper branch#308
drvdputt wants to merge 15 commits intoPAHFIT:devfrom
drvdputt:orion+galaxy_paper

Conversation

@drvdputt
Copy link
Contributor

There are still some loose ends since the publication of my paper (https://ui.adsabs.harvard.edu/abs/2025arXiv250705848V/abstract)

  1. There are some additional features only available in my fork of PAHFIT.
  2. We have to add the PDR pack. I have made a clean version of it.

For now, to ensure reproducibility, I have created a snapshot of the code as it was used for the Orion Bar paper, in the form of a release under my fork: https://github.com/drvdputt/pahfit/releases/tag/OrionPaper2025.

I am submitting my branch as a pull request, so you can see the changes. We can decide which features we want to port over and clean it up, though it looks like it's not that much in terms of lines of code.

The most notable parts, with some relevant issues linked:

  1. Option to switch between dust continuum models, by providing the "model" keyword in the PDR pack. + The modified blackbody that I used in the paper, here called SpecialModifiedBlackbody1D Alternative dust continua #299
  2. Option to switch between fitting methods (different algorithms can be selected within APFitter). Currently this is done by passing down a keyword from the Model.fit() invocation. Options are "lm" and "trf" (Levenberg Marquardt vs Trust-Region Reflective). The Fitter subclass has a function to advertise the available options. Relevant for No uncertainties being returned with LevMar fitter #149
  3. Different normalization for the blackbodies, addressing numerical precision issues. As discussed previously, we can consider changing the units of tau instead. (also: adjust initial guess for tau, as it was clipped between 0 and 1 previously). Units of (modified) Blackbody amplitude #296
  4. Option to pass multiple science packs when initializing a Model. Backwards compatible with a single science pack by using * for a variable number of arguments. Modular science pack idea #298

@jdtsmith
Copy link
Contributor

Awesome, thanks for your work, and for the reminder to take a look. Apologies for the long delay. I think we should pull this apart into a few PRs. Maybe something like (starting from highest priority):

  1. astropy.modeling "flavor (TRF) passthrough.
  2. PDR pack (does this use the alternative continuum flavor?).
  3. Pack inheritance.

I'm a bit worried about the special modified blackbody, that seems to open a real can of worms. One idea is to maintain that as a separate repo (with appropriate warnings).

@karllark
Copy link
Contributor

I respectfully disagree about the special modified blackbody. I think this is an important enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants