Skip to content

Commit 820c202

Browse files
Merge branch 'main' into renovate/mariadb-11.x
2 parents 63ccf9d + b5dfe2f commit 820c202

File tree

7 files changed

+23
-18
lines changed

7 files changed

+23
-18
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
python-version: ["3.10", "3.11", "3.12"]
1818
services:
1919
mariadb:
20-
image: mariadb:11.8.5 # released 2024-05-06
20+
image: mariadb:12.1.2 # released 2024-05-06
2121
# Pulls image from DockerHub
2222
# Docker images: https://hub.docker.com/_/mariadb
2323
# Previous version(s):
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v4
4444

4545
- name: Use Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v5
46+
uses: actions/setup-python@v6
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ jobs:
2727
uses: actions/checkout@v4
2828

2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v3
30+
uses: github/codeql-action/init@v4
3131
with:
3232
languages: ${{ matrix.language }}
3333
queries: +security-and-quality
3434

3535
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v3
36+
uses: github/codeql-action/autobuild@v4
3737
if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v3
40+
uses: github/codeql-action/analyze@v4
4141
with:
4242
category: "/language:${{ matrix.language }}"

.github/workflows/publish-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Use Python 3.10
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: "3.10"
2424
- name: Check current tag
@@ -66,7 +66,7 @@ jobs:
6666
steps:
6767
- uses: actions/checkout@v4
6868
- name: Set up Python 3.10
69-
uses: actions/setup-python@v5
69+
uses: actions/setup-python@v6
7070
with:
7171
python-version: "3.10"
7272
- name: Install pypa/build
@@ -128,7 +128,7 @@ jobs:
128128
name: package-distributions
129129
path: dist/
130130
- name: Sign the dists with Sigstore
131-
uses: sigstore/gh-action-sigstore-python@v3.0.0
131+
uses: sigstore/gh-action-sigstore-python@v3.2.0
132132
with:
133133
inputs: >-
134134
./dist/*.tar.gz

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Set up Python 3.10
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@v6
2424
with:
2525
python-version: "3.10"
2626
- name: Syntax validation
@@ -37,7 +37,7 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v4
3939
- name: Set up Python 3.10
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: "3.10"
4343
- name: Install pypa/build

.github/workflows/version-bump.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v4
3838
- name: Set up Python 3.10
39-
uses: actions/setup-python@v5
39+
uses: actions/setup-python@v6
4040
with:
4141
python-version: "3.10"
4242
- name: Install package

src/murfey/server/feedback.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,12 +1115,12 @@ def _find_initial_model(visit: str, machine_config: MachineConfig) -> Path | Non
11151115

11161116

11171117
def _downscaled_box_size(
1118-
particle_diameter: int, pixel_size: float
1118+
particle_diameter_ang: float, pixel_size: float
11191119
) -> Tuple[int, float]:
1120+
particle_diameter = particle_diameter_ang / pixel_size
11201121
box_size = int(math.ceil(1.2 * particle_diameter))
11211122
box_size = box_size + box_size % 2
11221123
for small_box_pix in (
1123-
48,
11241124
64,
11251125
96,
11261126
128,
@@ -1145,9 +1145,9 @@ def _downscaled_box_size(
11451145
# Don't go larger than the original box
11461146
if small_box_pix > box_size:
11471147
return box_size, pixel_size
1148-
# If Nyquist freq. is better than 8.5 A, use this downscaled box, else step size
1148+
# If Nyquist freq. is better than 7.5 A, use this downscaled box, else step size
11491149
small_box_angpix = pixel_size * box_size / small_box_pix
1150-
if small_box_angpix < 4.25:
1150+
if small_box_angpix < 3.75:
11511151
return small_box_pix, small_box_angpix
11521152
raise ValueError(f"Box size is too large: {box_size}")
11531153

@@ -1161,9 +1161,9 @@ def _resize_intial_model(
11611161
env: Dict[str, str],
11621162
) -> None:
11631163
with mrcfile.open(input_path) as input_mrc:
1164-
input_size_x = input_mrc.nx
1165-
input_size_y = input_mrc.ny
1166-
input_size_z = input_mrc.nz
1164+
input_size_x = input_mrc.header.nx
1165+
input_size_y = input_mrc.header.ny
1166+
input_size_z = input_mrc.header.nz
11671167
if executables.get("clip") and not input_size_x == input_size_y == input_size_z:
11681168
# If the initial model is not a cube, do some padding
11691169
clip_proc = subprocess.run(
@@ -1198,6 +1198,8 @@ def _resize_intial_model(
11981198
str(downscaled_box_size),
11991199
"--rescale_angpix",
12001200
str(downscaled_pixel_size),
1201+
"--force_header_angpix",
1202+
str(downscaled_pixel_size),
12011203
"--o",
12021204
str(output_path),
12031205
],

src/murfey/server/gain.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import asyncio
44
import logging
55
import os
6+
import shutil
67
from enum import Enum
78
from pathlib import Path
89
from typing import Dict, Tuple
@@ -130,4 +131,6 @@ async def prepare_eer_gain(
130131
f"{stderr.decode('utf-8').strip()}"
131132
)
132133
return None, None
134+
# Also copy the gain as a .gain file
135+
shutil.copy(secure_path(gain_path), secure_path(gain_out.with_suffix(".gain")))
133136
return gain_out, None

0 commit comments

Comments
 (0)