Skip to content

Commit

Permalink
deps: allow numpy>=2, add python 3.13 to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepVanlier committed Oct 25, 2024
1 parent 6811a98 commit ed72807
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylake_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.12"]
python-version: ["3.10", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* 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`](https://lumicks-pylake.readthedocs.io/en/latest/_api/lumicks.pylake.kymo.Kymo.html#lumicks.pylake.kymo.Kymo.red_power), [`Kymo.green_power`](https://lumicks-pylake.readthedocs.io/en/latest/_api/lumicks.pylake.kymo.Kymo.html#lumicks.pylake.kymo.Kymo.green_power), [`Kymo.blue_power`](https://lumicks-pylake.readthedocs.io/en/latest/_api/lumicks.pylake.kymo.Kymo.html#lumicks.pylake.kymo.Kymo.blue_power), [`Kymo.sted_power`](https://lumicks-pylake.readthedocs.io/en/latest/_api/lumicks.pylake.kymo.Kymo.html#lumicks.pylake.kymo.Kymo.sted_power).

#### Other changes

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

## v1.5.2 | 2024-07-24

#### Improvements
Expand Down
4 changes: 2 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ In China, the installation instructions as presented above can be slow. The foll
First, follow the first 3 steps of the installation instructions at the top of this page.
Next, create a new environment::

conda create -n pylake conda=23.7.2
conda create -n pylake

Activate the environment as follows::

Expand All @@ -309,7 +309,7 @@ Install pip in the activated environment by invoking::

Then install Pylake and Jupyter Notebook as follows::

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple lumicks.pylake[notebook]
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple "lumicks.pylake[notebook]"

Next, you can start Jupyter Notebook by typing::

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/force_calibration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Next we'll decalibrate the force data back to the original voltage measured by t

def decalibrate(force_slice):
offset = force_slice.calibration[0]["Offset (pN)"]
response = force_slice.calibration[0]["Rf (pN/V)"]
response = force_slice.calibration[0]["Response (pN/V)"]
return (force_slice - offset) / response

volts = decalibrate(force_slice)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def _fit_power_spectra(
solution_params_scaled = np.abs(minimize_result.x)
solution_params = scaled_model.scale_params(solution_params_scaled)

# Return NaN for perr, as scipy.optimize.minimize does not return the covariance matrix
perr = np.NaN * np.ones_like(solution_params)
# Return nan for perr, as scipy.optimize.minimize does not return the covariance matrix
perr = np.nan * np.ones_like(solution_params)

chi_squared = np.sum(((1 / model(frequencies, *solution_params) - 1 / powers) / sigma) ** 2)

Expand Down
2 changes: 1 addition & 1 deletion lumicks/pylake/kymotracker/kymotrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ def extract_dwelltime_data(group):
]
)
)
if np.all(min_observation_time) is None:
if None in np.asarray(min_observation_time):
raise RuntimeError(
"Minimum observation time unavailable in KymoTrackGroup (tracking was "
"performed prior to version `1.2.0`). The minimum observable time will be "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def read(filename):
install_requires=[
"pytest>=3.5",
"h5py>=3.4, <4",
"numpy>=1.24, <2", # 1.24 is needed for dtype in vstack/hstack (Dec 18th, 2022)
"numpy>=1.24",
"scipy>=1.9, <2", # 1.9.0 needed for lazy imports (July 29th, 2022)
"matplotlib>=3.8",
"tifffile>=2022.7.28",
Expand Down

0 comments on commit ed72807

Please sign in to comment.