Releases: tillbiskup/aspecd
Version 0.11.0
Released 2024-10-17
New features
-
Plotting
aspecd.plotting.PatchProperties
for properties of patches, as used foraspecd.annotation.VerticalSpan
andaspecd.annotation.HorizontalSpan
.aspecd.plotting.AnnotationProperties
andaspecd.plotting.AnnotationTextProperties
for properties of text annotations with lines, as used foraspecd.annotation.TextWithLine
.aspecd.plotting.AxesProperties
has new attributesframe_on
,xlabelposition
, andylabelposition
.aspecd.plotting.Spines
andaspecd.plotting.SpineProperties
for controlling spine properties of axes.aspecd.plotting.MarkerProperties
for properties of markers, as used foraspecd.annotation.Marker
.
-
Plot annotations
aspecd.annotation.VerticalSpan
for adding vertical spans (rectangles) to plot(ter)saspecd.annotation.HorizontalSpan
for adding horizontal spans (rectangles) to plot(ter)saspecd.annotation.TextWithLine
for adding text with additional linesaspecd.annotation.Marker
for adding markers to plot(ter)saspecd.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 inaspecd.annotation.TextWithLine
annotations.aspecd.analysis.CentreOfMass
for calculating the centre of mass for ND datasets.
-
IO
aspecd.io.TxtImporter
has an additional parameteraxis
specifying which column to use for axis values when reading 2D data. (#6)
Changes
-
Plotting: Default figure size in
aspecd.plotting.FigureProperties
set toNone
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
Released 2024-08-13
Fixes
- CompositePlotter shares axes correctly
Version 0.10.0
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
andaspecd.plotting.MultiPlotter1D
aspecd.plotting.TextProerties
aspecd.plotting.DrawingProperties
has attributezorder
.aspecd.plotting.SubplotGridSpecs
for properties of the subplot grid of a CompositePlotter.aspecd.plotting.CompositePlotter
allows to share x and y axes.
- Set individual properties for each of the lines of a
-
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 aaspecd.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 (viaresult
property). (#2)aspecd.tasks.Recipe.get_datasets
preserves order of datasets, regardless whether the datasets are originally imported or result from prior tasks (viaresult
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
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
andylabel
toNone
(ornull
in YAML/recipe).
Version 0.9.2
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
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
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
inaspecd.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.
- New function
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
(orself.datasets[#].data
), plotters need to accessself.data.data
(orself.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 toaspecd.dataset.Dataset.tasks
. -
aspecd.plotting.SinglePlotter1D
andaspecd.plotting.MultiPlotter1D
issue warning with log plotters and negative values. -
aspecd.annotation.DatasetAnnotation
has been renamed fromAnnotation
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
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 deprecatedscipy.interpolate.interp2d
toscipy.interpolate.RegularGridInterpolator
New features
aspecd.processing.Interpolation
works for ND datasets with arbitrary dimension Naspecd.tasks.Recipe
with new settingautosave_datasets
(default:True
)
Version 0.8.2
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
inaspecd.plotting.SinglePlot2DProperties
, allowing for consistently setting (default) colormaps for 2D surface plots within a recipe.
Version 0.8.1
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