Changelog
v0.4.dev
Added
tmp_dirargument torun_starlight()Added
make_2dfits()Allow
mask_regions()radii to be floatsChange required
[NII]line from6548to6583Change default summation of multi spaxel bins to remove weighting and added
weightedargument to methods that create bins that can be setTrueto recover the weighted method
Now multispaxel bins are just the arithmetic sum of individual spaxel spectra
v0.4.0
resultsdict has been reimplemented with a new structure and now supercedesbin_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()andparse_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_jsonargument toIFUCubeandMUSECube.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
fwhmandoffset(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
borderof ananvalue rather than only withinrof the edge of the array.The header card
BUNITis 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_dirandappendarguments fromrun_starlight().Fixed bug in calculation of bin distances from nucleus.
Removed unused components in bundled bc03 base.
Added
cumweightoption toplot_metallicity(). This will weight the cumulative metallicity plot by the H\(\alpha\) flux of each bin, as a proxy for the SFR.Added
smoothparameter toemission_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
filtwidthargument torun_emission_lines()to further remove broad continuum residuals.Added N2 indicator from Marino+13 (
M13_N2in results dict) and renamed the existingM13(O3N2) indicator toM13_O3N2.Updated continuum level determination for EW measurements of emission lines
Added
contentry to emission line results, giving the continuum level used for the EW measurement.Added new emission lines to STARLIGHT mask file.
Allow
el_jsonargument toIFUCubeto 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().
snrlimitargument available for_parse_emission()andline_map().
v0.3.0
Overhauled behind-the-scenes in emission line fitting to make more general for custom line additions:
The
astropy.modeling.CompoundModelis 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
resultsdictionary 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.
pathosis 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 newmin_npixargument.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()toplot_kinematics()Added
get_loc_bin()Updated metallicity plotting to include more plots.
Fixed bug in O3N2 metallicity calculation.
IFUCubenow takescube_hduas an argument, aastropy.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_hdushould be length-3 with the following entries:
Primary extension of the cube. Only the header is read from this extension - any data, if it even exists, is not accessed.
Science data (NaNs for bad data). A WCS in the header of this extension is required for some functionality.
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_hduis saved separately from the pickle file with the extension .fits. This is reread when loading an instance.Merged
get_emission_line_metallicities()andget_emission_line_fluxes()intoparse_emission().Renamed
plot_emission_lines()intoplot_emission()
v0.2.0
HII region binning algorithm added.
Removed
vor_snas an attribute ofIFUCube. Replaced withtarget_snargument tovoronoi_bin().
plot_starlight_results()renamed toplot_continuum().Reorganised
bin_num. Now a dictionary of mean and spax entries for each bin. See Binning the spaxels.
v0.1.0
First release