Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ jobs:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04, macOS-latest, macOS-11, windows-2019]
os: [ubuntu-latest, ubuntu-20.04, macOS-latest, macOS-11]
backend: [default, openblas]
python-version: ['3.8']
include:
- os: ubuntu-latest
backend: intel
- os: macOS-latest
backend: accelerate
- os: windows-2019
backend: default

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions gallery/experiments/experimental_abinitio_pipeline_10028.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
# logger.info("Invert the global density contrast")
# src = src.invert_contrast()

# Caching is used for speeding up large datasets on high memory machines.
src = src.cache()

# %%
# Optional: CWF Denoising
# -----------------------
Expand All @@ -119,6 +122,8 @@
cwf_denoiser = DenoiserCov2D(src)
# Use denoised src for classification
classification_src = cwf_denoiser.denoise()
# Cache for speedup. Avoids recomputing.
classification_src = classification_src.cache()
# Peek, what do the denoised images look like...
if interactive:
classification_src.images[:10].show()
Expand Down
3 changes: 3 additions & 0 deletions gallery/experiments/experimental_abinitio_pipeline_10081.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
aiso_noise_estimator = AnisotropicNoiseEstimator(src)
src.whiten(aiso_noise_estimator.filter)

# Caching is used for speeding up large datasets on high memory machines.
src = src.cache()

# %%
# Class Averaging
# ----------------------
Expand Down
2 changes: 1 addition & 1 deletion src/aspire/source/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def _extract_ctf(self, data_block):

# get unique ctfs from the data block
# i'th entry of `indices` contains the index of `filter_params` with corresponding CTF params
ctf_data = np.stack(data_block[c] for c in CTF_params).astype(self.dtype).T
ctf_data = np.stack([data_block[c] for c in CTF_params]).astype(self.dtype).T
filter_params, indices = np.unique(
ctf_data,
return_inverse=True,
Expand Down
2 changes: 1 addition & 1 deletion src/aspire/source/relion.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(
# If these all exist in the STAR file, we may create CTF filters for the source
if set(CTF_params).issubset(metadata.keys()):
# partition particles according to unique CTF parameters
ctf_data = np.stack(metadata[k] for k in CTF_params).T
ctf_data = np.stack([metadata[k] for k in CTF_params]).T
filter_params, filter_indices = np.unique(
ctf_data,
return_inverse=True,
Expand Down