Skip to content

Releases: lumicks/pylake

v1.6.0

10 Jan 12:18
Compare
Choose a tag to compare

New features

  • Calibration results and parameters are now accessible via properties which are listed when items are printed. See calibration results and calibration item API documentation for more information.
  • Added property diode_calibration to access the diode calibration model, and trap_power to access the used trap power in calibration item. See the new tutorial and theory for more information.
  • Added model to correct for bead-bead coupling when using active calibration deep in bulk with two beads. See tutorial, theory and example for more information.
  • Added option to highlight a region on a time plot using Slice.highlight_time_range(). For more information see the tutorial.
  • Added __array__ to Slice. This allows passing slices directly to numpy functions such as np.mean()or np.sum().
  • Added parameter allow_overwrite to lk.download_from_doi() to allow re-downloading only those files where the checksum does not match.
  • Added force calibration information to channels accessed directly via the square bracket notation (e.g. file["Force HF"]["Force 1x"].calibration).
  • Added applied_at property to a calibration item obtained from a force slice. This property returns the timestamp in nanoseconds at which the force calibration was applied.
  • Added parameter titles to customize the title of each subplot in Kymo.plot_with_channels().
  • Added KymoTrack.sample_from_channel() to downsample channel data to the time points of a kymotrack.
  • Added support for file names with spaces in lk.download_from_doi().
  • Show the ranges that were excluded from a power spectrum or calibration fit by passing show_excluded=True to PowerSpectrum.plot() or CalibrationResults.plot().
  • Plot the active calibration peak for a calibration result using show_active_peak=True with CalibrationResults.plot().
  • Added function to import a KymoTrackGroup from a CSV file using load_tracks.
  • Added function to load tracks into the kymotracker widget using KymoWidgetGreedy.load_tracks().

Improvements

  • Added improved printing of calibration items under channel.calibration providing a more convenient overview of the items associated with a Slice.
  • Added improved printing of calibrations performed with Pylake.
  • Improved FdFit error message that includes the name of the model when trying to access a model that was not added in an FdFit using angular brackets.
  • Allow customizing the minimum step size during step size determination for DwelltimeModel.profile_likelihood() and set a more sensible default. Also ensured that the warning only gets emitted at most once per direction.

Bug fixes

  • Fixed bug that prevented opening the force distance widgets when using them with the widget backend on matplotlib >= 3.9.0.
  • Ensure that operators such as (e.g. +, -, /) work on Slice with all types that are convertible to scalars. Previously these failed with zero dimensional numpy arrays and other convertible objects.
  • Fixed a bug where bead edge determination could fail with an unhandled exception during background estimation. This raised a np.linalg.LinAlgError when determining the background failed rather than the expected RuntimeError. In this case, a simple median is used as a fallback option.
  • Fixed a bug to ensure that lk.GaussianMixtureModel can also be used with a single state.
  • Fixed a bug that could result in a near 0/0 during fitting when components of a DwelltimeModel are near zero. Note that these only occurred during the computation of the model derivatives during the fitting procedure and should not impact the model simulation itself.

v1.5.3

29 Oct 16:01
Compare
Choose a tag to compare

Bug fixes

  • Fixed a bug where an inverted force-distance Model would raise when called with a scalar value. Now it just returns the expected value.
  • Fixed a bug that would lead to a division by zero warning when performing no color adjustment on a Scan or Kymo with zero photon counts.
  • Fixed a bug resulting in an exception when trying to read the excitation powers from a confocal object using Kymo.red_power, Kymo.green_power, Kymo.blue_power, Kymo.sted_power.

Other changes

  • Added support for python 3.13. Removed upper bound on numpy version.

v1.4.2

29 Oct 15:41
Compare
Choose a tag to compare

Changelog

  • Added a fallback which allows loading scans or kymographs that have truncated photon count channels.
  • Fixed a bug resulting in an exception when trying to read the excitation powers from a confocal object using Kymo.red_power, Kymo.green_power, Kymo.blue_power, Kymo.sted_power.

v1.5.2

24 Jul 15:09
Compare
Choose a tag to compare

Improvements

  • Added a fallback which allows loading scans or kymographs that have truncated photon count channels.

Bug fixes

  • Fixed bug that prevented opening the kymotracking widget when using it with the widget backend on matplotlib >= 3.9.0.
  • Fixed bug where photon counts were not being loaded from a csv file generated with the kymotracker.

v1.4.1

23 Jul 13:44
Compare
Choose a tag to compare

Bug fixes

  • Fixed statistical backing returning an incorrect value.
  • Fixed bug that prevented loading an h5 file where only a subset of the photon channels are available. This bug was introduced in Pylake 1.4.0.

v1.5.1

03 Jun 11:44
Compare
Choose a tag to compare
  • Fixed bug that prevented loading an h5 file where only a subset of the photon channels are available. This bug was introduced in Pylake 1.4.0.

v1.5.0

28 May 17:50
Compare
Choose a tag to compare

New features

Improvements

  • Added error message when parameters are passed to lk.parameter_trace() that do not have the required attributes.
  • Warn when parameter estimates are hitting the fitting bounds when using lk.parameter_trace().

Other changes

  • Switch to notebook v7 with ipympl. Note that this means that you have to have to invoke %matplotlib widget in notebooks where you previously used %matplotlib notebook. See the jupyter notebook 7 announcement for more information.

Bug fixes

  • Fixed statistical backing returning an incorrect value.
  • Fixed bug where the start_frame parameter was being ignored when exporting a movie with ImageStack.export_video() and Scan.export_video(). This bug was introduced in Pylake v1.3.0.

v1.4.0

28 Feb 15:42
Compare
Choose a tag to compare

New features

Bug fixes

  • Fixed a bug where the time indicator was off by one frame in ImageStack.plot_correlated() and ImageStack.export_video().
  • Fixed a bug where the time between frames was incorrectly not excluded when calling ImageStack.frame_timestamp_ranges() with include_dead_time=False. Note that Scan and Kymo are not affected.
  • Fixed a bug where ImageStack.plot_correlated() was not excluding the dead time between frames.
  • Fixed a bug where color adjustments on a single channel ImageStack would not be applied unless a channel was provided as argument. This bug was introduced in v1.3.0.
  • Changed the DateTime tag on TIFFs exported with Pylake from Scan and Kymo objects. Before the change, the start and end of the scanning period in nanoseconds was stored. After the change, we store the starting timestamp of the frame, followed by the starting timestamp of the next frame to be consistent with data exported from Bluelake. The scanning time is stored in the field Exposure time (ms) on the Description tag.
  • Fixed tests to be compatible with pytest>=8.0.0.
  • Ensure in returns True for a valid data path (e.g. "Force HF/Force 1x" in file should return True).

Improvements

  • ImageStack now closes any file handles it has open upon garbage collection.

Deprecations

  • Deprecated GaussianMixtureModel.from_channel(). The class constructor now accepts Slice instances directly.
  • Deprecated GaussianMixtureModel.label(). Use GaussianMixtureModel.state_path() instead. Note, the returned instance is type Slice rather than np.ndarray. The data can be accessed via model.state_path(channel_slice).data.
  • Deprecated GaussianMixtureModel.exit_flag Use GaussianMixtureModel.fit_info() instead. Note, the returned instance is a GmmFitInfo dataclass with attributes matching the keys of the dict returned from exit_flag (along with bic and aic; see next point).
  • Deprecated GaussianMixtureModel.bic and GaussianMixtureModel.aic properties. These values can now be accessed via the bic and aic properties of GaussianMixtureModel.fit_info.

Breaking changes (alpha functionality)

Other changes

  • Bump tifffile dependency to >=2022.7.28.

v1.3.1

07 Dec 15:25
Compare
Choose a tag to compare

Bug fix

v1.3.0

07 Dec 12:49
Compare
Choose a tag to compare

New features

Bug fixes

  • Fixed a bug in Scan.plot() in which the default aspect ratio was calculated such that pixels always appeared square. For scans with non-square pixel sizes, this would result in distortion of the image.
  • Fixed a bug in Slice.downsampled_like that would fail to raise an error due to a lack of overlap between the low frequency and high frequency channel when the high frequency channel starts within the last sample of the low frequency channel.
  • Fixed lk.download_from_doi() to align with new Zenodo REST API.
  • Don't store animation writer in a temporary variable as this results in a matplotlib error when attempting to export a movie on jupyter notebook.

Improvements

  • Kymographs consisting of a single scan line now return a valid line_time_seconds. This allows certain downstream functionality, such as Kymo.plot().
  • Issue a more descriptive error when attempting to compute a diffusion constant of a track with no points.
  • Pylake can now handle kymographs that were erroneously stored in the Scan field. Kymographs with a pre-specified number of lines to record were incorrectly being marked on the timeline and exported as Scan instead of Kymograph in versions of Bluelake prior to 2.5.0.