Skip to content

v0.5.0

Latest

Choose a tag to compare

@roytsmart roytsmart released this 16 Oct 20:47
cecd0dc

utu.dem

New: emission_measure(), the emission measure each temperature of a DEM stands for (#15). plowman() takes the DEM and each temperature response to be linear in log T between the temperatures, and fits the intensities with the integral of their product, Rᵀ M D, where M is the mass matrix of those triangle functions. emission_measure() returns M D, so the intensity a channel's response predicts from it, (response.outputs * emission_measure(dem, "temperature")).sum("temperature"), is the intensity the fit found. The sum of the DEM times the response times the step, and the trapezoid rule, both weight each temperature by the sum of its row of M instead, so they differ from the fit wherever the DEM and the response both change across a step.

  • Grids: it takes uneven grids, a grid for each pixel, and any other axes of the DEM, such as the two axes of a map.
  • Uncertain arrays: an uncertain DEM, or uncertain temperatures, is weighted sample by sample.
  • Spectra: the result can be given to utu.spectrum.synthesize() as the emission measure of each bin.

Its docstring explains two limits:

  • Ranges: summed over a range of temperatures, the result isn't the integral of the DEM over that range, since each temperature stands for plasma up to a step either side of it. The docstring shows how to compute that integral with FunctionArray.integrate.
  • Interpolation: it integrates the functions as interpolated linearly between the temperatures, not the functions themselves. For smooth functions the grid resolves, the plain sum is much closer to their true integral. So use emission_measure() to predict intensities consistently with the fit, and integrate the functions themselves to simulate intensities to test an inversion with.

plowman() now builds its mass matrix from the same definition, and its DEMs are unchanged, bit for bit.

What's Changed

  • Add utu.dem.emission_measure, the emission measure each temperature of a piecewise-linear DEM stands for by @roytsmart in #15

Full Changelog: v0.4.0...v0.5.0