Changelog

v0.4.dev

  • Added tmp_dir argument to run_starlight()

  • Added make_2dfits()

  • Allow mask_regions() radii to be floats

  • Change required [NII] line from 6548 to 6583

  • Change default summation of multi spaxel bins to remove weighting and added weighted argument to methods that create bins that can be set True to recover the weighted method

    • Now multispaxel bins are just the arithmetic sum of individual spaxel spectra

v0.4.0

  • results dict has been reimplemented with a new structure and now supercedes bin_nums.

    • Each bin’s spectrum and nucleus distances are now calculated upon bin creation.

    • Continuum and emission line fitting are contained in separate entries of each bin’s results entry named "continuum" and "emission".

  • parse_results() and parse_emission() have been renamed to _parse_continuum() and _parse_emission(). They are automatically called after fitting so do not need to be explicitly called usually.

  • Added nearest_bin() as a new binning method combining emission line and voronoi binning.

  • The Balmer decrement is calculated when parsing the emission line model and an estimate of E(B-V)_gas is made to deredden the fluxes of the emission lines.

  • Added plot_line_map() to visualise the results for a given emission line.

  • Added plot_bpt() to produce a BPT diagram.

  • Exposed the filepath of the json emission lines file via the el_json argument to IFUCube and MUSECube.

  • Emission line fitting now fits the the line widths of each entry in data/emission_lines.json separately (doublet/triplet lines will be tied to the same widths). Previously only two widths were fit, one for forbidden lines and one for Balmer.

  • Custom bins are now highlighted on the radial and cumulative metallicity plots.

  • Statistical uncertainties on metallicity measurements are now calculated.

  • Emission line results for fwhm and offset (and their uncertainties) are now given in km/s.

  • Emission line results are now length 2 tuples of (value, uncert) and the defunct entries (e.g. flux_uncert, fwhm_uncert) are removed.

  • Initial bin seeds are now plotted on the bin map for emission line binning.

  • Fixed the behaviour of emission line bin to now reject bin seeds within border of a nan value rather than only within r of the edge of the array.

  • The header card BUNIT is now queried in the DATA extension to get the flux units in order to label plots.

  • The spectra returned by _get_weighted_spectrum() are now multiplied by the number of spaxels in the bin to conserve flux.

  • Removed use_tmp_dir and append arguments from run_starlight().

  • Fixed bug in calculation of bin distances from nucleus.

  • Removed unused components in bundled bc03 base.

  • Added cumweight option to plot_metallicity(). This will weight the cumulative metallicity plot by the H\(\alpha\) flux of each bin, as a proxy for the SFR.

  • Added smooth parameter to emission_line_bin() to smooth the line map before peak detection.

  • BPT plot is only made for bins with S/N > 3 for all relevant line fluxes.

  • Fix bug in bin spectra uncertainty calculation.

  • Added filtwidth argument to run_emission_lines() to further remove broad continuum residuals.

  • Added N2 indicator from Marino+13 (M13_N2 in results dict) and renamed the existing M13 (O3N2) indicator to M13_O3N2.

  • Updated continuum level determination for EW measurements of emission lines

  • Added cont entry to emission line results, giving the continuum level used for the EW measurement.

  • Added new emission lines to STARLIGHT mask file.

  • Allow el_json argument to IFUCube to now be given as a dictionary or json filename.

  • Apply Balmer decrement correction to the uncertainties of flux and equivalent width.

  • Fitting a subset (or different) emission lines to the default list no longer throws KeyError when calculating metallicities.

  • Added plot_extinction().

  • The base_name (which determines where to save figures etc.) is now updated on loading an instance via load_pkl().

  • snrlimit argument available for _parse_emission() and line_map().

v0.3.0

  • Overhauled behind-the-scenes in emission line fitting to make more general for custom line additions:

    • The astropy.modeling.CompoundModel is no longer stored due to issues with pickling, but is instead created as and when necessary via _get_emline_model().

    • The emission line fitting results are all stored in the results dictionary entry designated by line name following data/emission_lines.json.

    • data/emission_lines.json can now be added to with other lines, although the existing entries should not be altered.

  • pathos is no longer a requirement.

  • Each bin formed by emission_line_bin() is now restricted to be a contiguous group of pixels satisfying the algorithm conditions. A minimum size of the bins in pixels can be set via the new min_npix argument.

  • Updated get_weighted_spectrum() to return the weighted mean of the uncertainty in the spaxels rather than the absolute differences from the mean.

  • Renamed plot_kinematic() to plot_kinematics()

  • Added get_loc_bin()

  • Updated metallicity plotting to include more plots.

  • Fixed bug in O3N2 metallicity calculation.

  • IFUCube now takes cube_hdu as an argument, a astropy.io.fits.HDUList (see herehttp://docs.astropy.org/en/stable/io/fits/api/hdulists.html), instead of separate science data and stddev cube headers. cube_hdu should be length-3 with the following entries:

    1. Primary extension of the cube. Only the header is read from this extension - any data, if it even exists, is not accessed.

    2. Science data (NaNs for bad data). A WCS in the header of this extension is required for some functionality.

    3. Standard deviation of the science data.

  • Saving and loading instances has been updated to separate the cube data from the pickle file. The FITS file described by cube_hdu is saved separately from the pickle file with the extension .fits. This is reread when loading an instance.

  • Merged get_emission_line_metallicities() and get_emission_line_fluxes() into parse_emission().

  • Renamed plot_emission_lines() into plot_emission()

v0.2.0

  • HII region binning algorithm added.

  • Removed vor_sn as an attribute of IFUCube. Replaced with target_sn argument to voronoi_bin().

  • plot_starlight_results() renamed to plot_continuum().

  • Reorganised bin_num. Now a dictionary of mean and spax entries for each bin. See Binning the spaxels.

v0.1.0

  • First release