Skip to content

New N2H+ model, Refitting Likelihood Patches, Data Visualization, and Read the Docs

Compare
Choose a tag to compare
@mcyc mcyc released this 18 Dec 00:15
· 125 commits to main since this release
81050d1

Main Features and Updates

New Spectral Model: N2H+

This release introduces a new, 2-component spectra model to fit N2H+ (1–0) lines, in addition to the pre-existing NH3 (1,1) 2-component models described in Chen et al. (2020). The implementation of the N2H+ model was led by @jcaza02.

Likelihood Calculation Patch for Refits

The previous versions contain a long-standing bug where the calculated relative log-likelihood (ln k) for pixels replaced by a refit can be incorrect, even though the pixel was correctly replaced with a better 2-component model as determined by the AICc. The bug ultimately only affects how pixels were selected for refits, following the initial attempt. The ln k maps saved by save_best_2comp_fit were unaffected, since the saving method was designed to isolate these types of bugs. The bug also did not affect refit selection that was performed fresh from loading the earlier results from a new instance of the UltraCube class.

Python 3.12 Compitable

MUFASA is now Python 3.12 compatible. Installation requirements, specifically for the pyspeckit and FITS_tools packages, have been specified in setup.py to ensure compatibility.

New Refitting Method

The refit_bad_2comp module under master_fitter.py now contains a new guessing method called 'best_neighbour' and is made the default option. The 'best_neighbour' method uses the best-fit model in a pixel's immediate neighbourhood as its guesses for the refit.

Visualization Tools

MUFASA now has visualization tools to plot the spectral fits in a grid and modelled parameters in 3D (PPV).

Documentation on Read the Docs

MUFASA now has a documentation site on Read the Docs

Notable Changes

Bug Fixes and Stability Improvements

  • Fixed long-standing bug in load_model when converting between km/s and GHz by @mcyc.
  • Fixed small pixel-number bug and refined guessing with astropy's convolve as the default method by @mcyc.
  • Addressed invalid starting position bug by @mcyc.
  • Patched pandas forward-compatibility issue by @mcyc.
  • Addressed astropy 6.1.4 compatibility issues by @mcyc.
  • Improved unit handling with automatic checks and conversions when loading cubes by @mcyc.

Refitting and Model Enhancements

  • Added a new refit method: 'best_neighbour', now the default option in refit_bad_2comp, by @mcyc.
  • Enhanced refit capabilities:
    • Masked recalculations @mcyc.
    • Refitting marginally good models with refit_marginal() by @mcyc.
    • Generalized replace_bad_pix() for broader applications by @mcyc.
    • Improved wide 2-component refitting for NH₃ by @mcyc.
  • Changed lnk_thresh default to -5 in refit_bad_2comp by @mcyc.

New Features and Tools

  • Added spectral model support for N₂H⁺ (1–0), building on contributions by @jcaza02 and @mcyc.
  • Implemented visualization tools:
    • Spectral fit visualization and saved FITS loading by @mcyc.
    • Added visualization example to README.md @mcyc.
    • Enabled 3D PPV scatter plots by @mcyc.
  • Improved peak T estimator accuracy within the MetaModel class by @mcyc.

Performance and Efficiency

  • Improved memory efficiency for moment and SNR estimates by @mcyc.
  • Improved multicore selection for parallel processing by @taiwithers.

Logging and Error Handling

  • Added robust logging functionality by @taiwithers.
  • Implemented time-stamped logging for better debugging and reproducibility by @mcyc.
  • Introduced custom exception classes for in-house error handling by @mcyc.

Documentation

  • Released the first complete MUFASA documentation website on Read the Docs by @mcyc.

New Contributors

Full Changelog: v1.2.0...v1.4.0