Skip to content

Releases: tillbiskup/aspecd

Version 0.11.0

17 Oct 19:02
Compare
Choose a tag to compare

Released 2024-10-17

New features

  • Plotting

    • aspecd.plotting.PatchProperties for properties of patches, as used for aspecd.annotation.VerticalSpan and aspecd.annotation.HorizontalSpan.
    • aspecd.plotting.AnnotationProperties and aspecd.plotting.AnnotationTextProperties for properties of text annotations with lines, as used for aspecd.annotation.TextWithLine.
    • aspecd.plotting.AxesProperties has new attributes frame_on, xlabelposition, and ylabelposition.
    • aspecd.plotting.Spines and aspecd.plotting.SpineProperties for controlling spine properties of axes.
    • aspecd.plotting.MarkerProperties for properties of markers, as used for aspecd.annotation.Marker.
  • Plot annotations

    • aspecd.annotation.VerticalSpan for adding vertical spans (rectangles) to plot(ter)s
    • aspecd.annotation.HorizontalSpan for adding horizontal spans (rectangles) to plot(ter)s
    • aspecd.annotation.TextWithLine for adding text with additional lines
    • aspecd.annotation.Marker for adding markers to plot(ter)s
    • aspecd.annotation.FillBetween for colouring the surface below a curve.
  • Analysis

    • aspecd.analysis.PeakFinding can return both, peak positions and intensities, as pairs, ready to be used in aspecd.annotation.TextWithLine annotations.
    • aspecd.analysis.CentreOfMass for calculating the centre of mass for ND datasets.
  • IO

    • aspecd.io.TxtImporter has an additional parameter axis specifying which column to use for axis values when reading 2D data. (#6)

Changes

  • Plotting: Default figure size in aspecd.plotting.FigureProperties set to None to allow setting from matplotlibrc to take effect.

    Without adjustments, this may change the size (and aspect ratio) of your figures from 6x4 inches to 6.4x4.8 inches.

Fixes

  • CompositePlotter operates on copies of plotters.
  • Plot task writes correct filename for each plotter if results is used.
  • PlotannotationTask saves properties to recipe history.
  • PlotannotationTask can be applied to plotter and stored for later use as result at the same time.
  • Text plot annotation with scalar y position set to zero works.

Version 0.10.1

13 Aug 18:13
Compare
Choose a tag to compare

Released 2024-08-13

Fixes

  • CompositePlotter shares axes correctly

Version 0.10.0

10 Aug 14:00
Compare
Choose a tag to compare

Released 2024-08-10

New features

  • Plotting

    • Set individual properties for each of the lines of a aspecd.plotting.SinglePlotter2DStacked
    • Conveniently set identical properties for all lines of aspecd.plotting.SinglePlotter2DStacked and aspecd.plotting.MultiPlotter1D
    • aspecd.plotting.TextProerties
    • aspecd.plotting.DrawingProperties has attribute zorder.
    • aspecd.plotting.SubplotGridSpecs for properties of the subplot grid of a CompositePlotter.
    • aspecd.plotting.CompositePlotter allows to share x and y axes.
  • Plot annotations

    • aspecd.annotations.Text for text annotations to plot(ter)s
  • Tasks

    • aspecd.tasks.SingleplotTask allows to set as many results as datasets, to allow for adding an individual plotter (for one of the datasets) to a aspecd.tasks.CompositeplotTask. (#3)
  • Models

    • aspecd.model.Voigtian for creating Voigt profiles frequently used in spectroscopy to describe line shapes.

Fixes

  • Tasks

    • aspecd.tasks.MultiplotTask preserves order of datasets the task is applied to, regardless whether the datasets are originally imported or result from prior tasks (via result property). (#2)
    • aspecd.tasks.Recipe.get_datasets preserves order of datasets, regardless whether the datasets are originally imported or result from prior tasks (via result property).
    • aspecd.tasks.Chef.cook closes open figures.
  • Plotting

    • CompositePlotter does not add additional drawings any more to the plotters used. (#5)

Version 0.9.3

22 Jul 16:42
Compare
Choose a tag to compare

Released 2024-07-22

Fixes

  • Correct method for area normalization: take number of points into account.
  • Adjust stacking in SinglePlotter2DStacked for data with larger minima than maxima.
  • Templates for LaTeX dataset report: escape _ and # in dataset label.
  • Axis labels can be removed by setting one or both of xlabel and ylabel to None (or null in YAML/recipe).

Version 0.9.2

24 Mar 21:09
Compare
Choose a tag to compare

Released 2024-03-24

Fixes

  • Revert changes in :class:aspecd.utils.ToDictMixin from version 0.9.1, as it caused problems with Matplotlib.
  • Updates on contour plots to work with Matplotlib 3.8
  • Updates to prevent deprecation warning for NumPy 1.25
  • :class:aspecd.processing.RangeExtraction extracts correct range for axis values.

Version 0.9.1

15 Jan 20:19
Compare
Choose a tag to compare

Released 2024-01-15

Fixes

  • aspecd.utils.ToDictMixin does no longer modify the __dict__ or __odict__ property of a class directly, what may have resulted in unexpected behaviour, but operates on a (deep)copy.

Changes

  • Use Black for automatic code formatting

Version 0.9.0

13 Jan 20:12
Compare
Choose a tag to compare

Released 2024-01-13

New features

  • Processing steps

    • aspecd.processing.CommonRangeExtraction works for ND datasets with arbitrary dimension N
  • Plotting

    • Legend title can be set from recipes

    • New attribute aspecd.plotting.AxesProperties.invert for inverting axes. Helpful, e.g., for plotting FTIR data without having to resort to explicitly provide descending axis limits.

    • Setting font size of axes labels via label_fontsize property.

    • Colorbar for 2D plotter

    • Annotations for plots

  • Device data

    • New property aspecd.dataset.Dataset.device_data for storing additional/secondary (monitoring) data.

    • New class aspecd.dataset.DeviceData for device data.

    • New class aspecd.analysis.DeviceDataExtraction for extracting device data from a dataset as a separate dataset. This allows to proceed with the extracted datasets as with any other dataset.

    • New class aspecd.plotting.MultiDeviceDataPlotter1D for plotting multiple device data of a single dataset.

    • New parameter device_data in aspecd.plotting.Plotter for plotting device data rather than primary data of a dataset/datasets

  • Logging

    • New function aspecd.utils.get_logger to get a logger object for a given module with the logger within the hierarchy of the ASpecD root logger. Important for packages derived from the ASpecD framework in order to get their log messages being captured, e.g. during recipe-driven data analysis.

Changes

  • Plotters can now handle device data instead of the primary data of a dataset (see above). This means, however, that instead of accessing self.dataset.data (or self.datasets[#].data), plotters need to access self.data.data (or self.data[#].data) instead.

    Authors of derived packages should update their plotters accordingly. See the hints for developers on device data in the plotting module.

  • Serving recipes logs messages from all ASpecD modules, not only from the aspecd.tasks module.

  • aspecd.io.DatasetImporterFactory logs warning if no concrete importer could be found for a given dataset, as this will usually result in (sometimes hard to detect) downstream problems.

  • aspecd.io.DatasetExporter adds a history record to aspecd.dataset.Dataset.tasks.

  • aspecd.plotting.SinglePlotter1D and aspecd.plotting.MultiPlotter1D issue warning with log plotters and negative values.

  • aspecd.annotation.DatasetAnnotation has been renamed from Annotation to reflect the fact that there are now plot annotations as well.

Documentation

  • New example: Plotting FTIR spectra normalised to spectral feature
  • Section with general tips and tricks for styling plotters.

Fixes

  • aspecd.utils.ToDictMixin.to_dict does not traverse settings for properties to exclude and include.
  • Workaround for matplotlib.figure.Figure.savefig not correctly handling figure DPI settings.

Version 0.8.3

08 Sep 15:45
Compare
Choose a tag to compare

Released 2023-09-08

Fixes

  • Exporter tasks (aspecd.tasks.ExportTask) automatically save datasets with default name if no target is provided.
  • Correct setting of contour plot properties with newer versions of Matplotlib

Changes

  • aspecd.processing.Interpolation changed interpolation method for 2D data from deprecated scipy.interpolate.interp2d to scipy.interpolate.RegularGridInterpolator

New features

  • aspecd.processing.Interpolation works for ND datasets with arbitrary dimension N
  • aspecd.tasks.Recipe with new setting autosave_datasets (default: True)

Version 0.8.2

24 Aug 14:53
Compare
Choose a tag to compare

Released 2023-08-24

Fixes

  • Handling of too long filenames when saving plots: the filename is replaced by its MD5 hash.

New features

  • New setting default_colormap in recipes.
  • Property colormap in aspecd.plotting.SinglePlot2DProperties, allowing for consistently setting (default) colormaps for 2D surface plots within a recipe.

Version 0.8.1

11 Aug 13:47
Compare
Choose a tag to compare

Released 2023-08-11

Documentation

  • New section on metadata during data acquisition
  • New section with examples
  • New section with data publications

Fixes

  • Baseline correction in aspecd.processing.BaselineCorrection issues warning if more than 100% of the data are used and resets to 50% on each side.
  • Recipe history contains importer parameters