Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
19eb2b5
Add PyWavelets dependency
garrettwrong May 20, 2021
64882e4
initial add of Amit M code
garrettwrong May 20, 2021
edb5224
add wemd function and change docstring format
garrettwrong May 20, 2021
d94d702
formatting wemd code
garrettwrong May 20, 2021
96a2c74
add wemd to operators __init__ and change name embed~>wembed
garrettwrong May 20, 2021
324dd04
change assert to ValueError
garrettwrong May 20, 2021
ca6d1e8
add wemd unit test stub
garrettwrong May 20, 2021
016a0bb
First version of wavelet-based approximate Earthmover's distance, wit…
mosco Jun 7, 2021
723fb8e
apply auto style/linter
garrettwrong Jun 7, 2021
e3fe655
minor tweaks, unused import, int div, conver print to logger
garrettwrong Jun 7, 2021
05bcc10
line length tweaks
garrettwrong Jun 7, 2021
e279c3d
Reponse to janden's review.
mosco Jun 7, 2021
0c02981
Minor comment
mosco Jun 7, 2021
aea4d7b
Added default values for the wavelet and level parameters of WEMD.
mosco Jun 7, 2021
29982cf
Minor performance improvement of wemd_embed
mosco Jun 7, 2021
5ef2679
wemd_embed: suppress boundary effect warning when calling pywt.wavede…
mosco Jun 7, 2021
6cec52a
isort/black formatting
garrettwrong Jun 8, 2021
8e5de52
remove unused imports
garrettwrong Jun 8, 2021
37d39dd
Disambiguate built-in `all` with `np.all`
garrettwrong Jun 8, 2021
57512e7
use context block for warnings filter
garrettwrong Jun 8, 2021
5d4ac32
rename testfile to match methods
garrettwrong Jun 8, 2021
c2b89e2
Merge pull request #419 from ComputationalCryoEM/add_wbemd_418
garrettwrong Jun 8, 2021
d8ff8f5
Extend unit test to cover broken volume case
garrettwrong Jun 9, 2021
d01e4a8
Add a helpful log message for the next guy
garrettwrong Jun 9, 2021
26808b8
Patch ArrayImageSource to handle optional _rotations(rots/angs).
garrettwrong Jun 9, 2021
f9a4b81
Add unit tests to cover new code.
garrettwrong Jun 10, 2021
3193954
clean up doc strings and comments in image.py
garrettwrong Jun 10, 2021
b85fbe1
remove redundant attribute
garrettwrong Jun 10, 2021
aa6f6a5
some comment tweaks
garrettwrong Jun 10, 2021
6899a67
Improve handling of corrupt mrc files in APPLE.picking
garrettwrong Jun 14, 2021
a6a9d4f
mrcfile.open should be 'r' only here.
garrettwrong Jun 14, 2021
8ebad70
Cover new code with unit tests
garrettwrong Jun 14, 2021
d5f40b4
Merge pull request #429 from ComputationalCryoEM/fix_428
garrettwrong Jun 15, 2021
61d959f
workaround PIL upstream issue
garrettwrong Jul 1, 2021
7dc1fc5
Merge pull request #434 from ComputationalCryoEM/fix_pil_u_433
garrettwrong Jul 1, 2021
70f7749
Make codecov informational only
garrettwrong Jul 6, 2021
fef297a
Merge pull request #435 from ComputationalCryoEM/code_cov_informational
garrettwrong Jul 6, 2021
b9cb3b0
stashing some tinkering with bispectrum, need to implement SPCA
garrettwrong Mar 29, 2021
cf140fb
Begin adding fspca basis feature.
garrettwrong Mar 30, 2021
c854d2a
add debugging scripts
garrettwrong Apr 14, 2021
763be1f
stashing before re-org
garrettwrong Apr 15, 2021
ceccbf2
refactor bispectrum/rotate stub to a base class
garrettwrong Apr 15, 2021
b666dd8
stashing
garrettwrong Apr 15, 2021
1714af6
fix isort import
garrettwrong Apr 16, 2021
1268c55
add second stage truncation, copy over pca_y and nn
garrettwrong Apr 16, 2021
1204c43
style autocleanup
garrettwrong Apr 16, 2021
c458f71
trudging though the old NN hack
garrettwrong Apr 16, 2021
af8c0c3
bring just enough of the classificiation code post NN to make a large…
garrettwrong Apr 19, 2021
fe34d12
clean up a test loop
garrettwrong Apr 19, 2021
e0c8325
stashing
garrettwrong Apr 20, 2021
8d3c4d1
stashing
garrettwrong May 3, 2021
1041bce
legacy code seems to do something reasonable for (unreflected images)
garrettwrong May 3, 2021
50c8c68
Able to replace nearest neighbor with scikit.
garrettwrong May 3, 2021
2effc8d
remove some debugging prints etc
garrettwrong May 3, 2021
74b3707
merge in upstream patch and black changes
garrettwrong May 3, 2021
c870baf
fix test case
garrettwrong May 3, 2021
35ae310
start moving out some of the legacy implementations to a scratch file
garrettwrong May 5, 2021
74658be
ignore debug files in code coverage
garrettwrong May 5, 2021
52f3dc6
give up on scikit PCA for now
garrettwrong May 5, 2021
c7ecf8c
add ComplexPCA class and smoke test
garrettwrong May 6, 2021
6240da2
add complexPCA unit test
garrettwrong May 6, 2021
74d9729
Modularize the PCA and NN implementations to clean up the main method
garrettwrong May 6, 2021
c72a407
add a small note regarding how to extend
garrettwrong May 6, 2021
d353638
add basic sanity test for bispectrum
garrettwrong May 6, 2021
5b6e35b
style cleanup
garrettwrong May 6, 2021
57dcfdf
Make the tests more reasonably sized
garrettwrong May 6, 2021
e2d5218
rm debugging eigenimages
garrettwrong May 6, 2021
64c2366
add compressed fspca bispect test
garrettwrong May 6, 2021
0d05f9f
cover args to bispect
garrettwrong May 6, 2021
f7ccaab
FB2D test with Image instance
garrettwrong May 6, 2021
2efbd6f
Add some tests for corner cases of to_complex, to_real for coverage
garrettwrong May 6, 2021
6f78cb4
remove uncalled functions I added while debugging
garrettwrong May 6, 2021
6c958d0
modularize bispectrum so can compare with Legacy
garrettwrong May 11, 2021
b5ca7b9
little cleanup
garrettwrong May 11, 2021
18eb1a1
add simple output method to rir class
garrettwrong May 12, 2021
71f8610
change assert to NotImplemented
garrettwrong May 12, 2021
412a66c
add RIR notebook, removes debug scripts
garrettwrong May 12, 2021
d2bb9d4
flake8 lint does not like array ==
garrettwrong May 12, 2021
171ee29
add noise_var weight to FSPCA decomp
garrettwrong May 12, 2021
c5d4e07
fix circ dep import
garrettwrong May 12, 2021
7ba313f
add PyNNDescent Approx NN
garrettwrong May 13, 2021
3f13d18
add rir class utest
garrettwrong May 14, 2021
93b2d74
lint checks
garrettwrong May 14, 2021
02b1d94
make pynndescent an optional package, seems to negatively impact buil…
garrettwrong May 17, 2021
5f7716b
stub in place for adaptive support and cmp fb/cart averages before mo…
garrettwrong May 25, 2021
5963235
remove pynndescent
garrettwrong May 25, 2021
512e470
stub in cov2d instead of making my own cov matrix
garrettwrong May 26, 2021
d7e2d48
stashing with cov2d, need fix complex compression
garrettwrong Jun 2, 2021
4f9d959
hack in some temporary code for the compressed fspca code
garrettwrong Jun 3, 2021
e00ffa9
stashing, severe weather
garrettwrong Jun 4, 2021
4b36048
Bump version: 0.6.3 → 0.7.0
garrettwrong Jun 3, 2021
ec2ab44
patch up unit tests for changes made (towards adopting reals followin…
garrettwrong Jun 4, 2021
9a410de
update notebook
garrettwrong Jun 8, 2021
80ff516
stashing after bug revelation
garrettwrong Jun 16, 2021
414ed08
remove denoised_output which used the FSPCA coefs
garrettwrong Jun 17, 2021
52deded
update nb
garrettwrong Jun 23, 2021
4fe3817
revert smaller uint dtypes in fb_2d, no savings
garrettwrong Jun 23, 2021
6146739
cleanup and relocated the fix_signs util
garrettwrong Jun 23, 2021
1daed82
cleanup diagnostic plot a little
garrettwrong Jun 23, 2021
18639d6
make the class indices lists consistent
garrettwrong Jun 23, 2021
e6a3036
try to tweak ut contraint
garrettwrong Jun 24, 2021
0b5183f
revert accidentally touched file
garrettwrong Jun 24, 2021
b13186e
light reorg and comment touch ups
garrettwrong Jun 24, 2021
4cfbdc7
missing ending newline in tox.ini
garrettwrong Jun 24, 2021
aeefaea
add smoke tests for base class2D
garrettwrong Jun 24, 2021
bc612de
omit sk-learn sourced file from test coverage
garrettwrong Jun 24, 2021
797cf8a
Cover ComplexPCA wrapper, adds args coverage
garrettwrong Jun 24, 2021
c764c66
add more tests for legacy code implementations
garrettwrong Jun 24, 2021
5c0e122
add more basic tests for FSPCA
garrettwrong Jun 24, 2021
d6c659d
Cover some corner cases of RIRClass2D
garrettwrong Jun 25, 2021
d477c4f
removed adaptive support, moved to seperate PR.
garrettwrong Jun 25, 2021
f1ea4dc
replace legacy function with equivalent ASPIRE-Python call
garrettwrong Jun 29, 2021
fc9110f
some cleanup, mainly comments
garrettwrong Jul 1, 2021
1a59fb7
Some misc comment/docstring cleanup
garrettwrong Jul 6, 2021
729752b
notebook refresh
garrettwrong Jul 6, 2021
e7268f2
Fix unit test var change
garrettwrong Jul 6, 2021
ad3ef7c
Test correct (Complex)PCA implementation.
garrettwrong Jul 12, 2021
595c515
Remove bispect squeeze and adjust checks/dims in related code
garrettwrong Jul 12, 2021
02129ce
convert assert typo into exception raise
garrettwrong Jul 12, 2021
f68a009
change noise estimator and fix zero freq mean call
garrettwrong Jul 12, 2021
9251ef1
replace einsum with matmul
garrettwrong Jul 12, 2021
90e378c
add comment about OrderedDict/Set
garrettwrong Jul 12, 2021
d5f02aa
fix typo bispectrum_componenents
garrettwrong Jul 12, 2021
eef1e74
fix typo bispectrum_componenents, missed one
garrettwrong Jul 13, 2021
85650ed
remove superflous `del`
garrettwrong Jul 13, 2021
df8de60
remove include_refl option
garrettwrong Jul 13, 2021
9c0b9c9
Update sample_n comment
garrettwrong Jul 13, 2021
3590ee6
Rename SteerableBasis~~>SteerableBasis2D
garrettwrong Jul 13, 2021
2c547b8
Move `eigen_images` to FSPCA
garrettwrong Jul 13, 2021
eb5d886
docstring typo
garrettwrong Jul 13, 2021
474efb8
Convert `output` to be ArrayImageSource
garrettwrong Jul 13, 2021
127277f
minor change complex_count calc code
garrettwrong Jul 13, 2021
125d257
change indice var names
garrettwrong Jul 13, 2021
0a9a0d8
remove unused line
garrettwrong Jul 13, 2021
2ac6cec
add `fix_signs` unit test
garrettwrong Jul 13, 2021
d4a0e86
refaactor `fix_signs` and extend unit test for complex and zero col case
garrettwrong Jul 13, 2021
bf26cf0
refactor comments to look less like code
garrettwrong Jul 13, 2021
00795f1
replace where with argmax
garrettwrong Jul 13, 2021
e35a64d
flex an additonal smoke test combo, devel bispect with legacy pca
garrettwrong Jul 13, 2021
2a31bb4
rm unused import
garrettwrong Jul 13, 2021
285183b
add some comments regarding one of the map for comrpessed uniq_radial…
garrettwrong Jul 13, 2021
45e7f27
refactor NN (and align) codes to return a more sane representation
garrettwrong Jul 13, 2021
23ca217
excercise var in unit test
garrettwrong Jul 13, 2021
49c56ae
Add adaptive support method and unit tests
garrettwrong Jun 29, 2021
ed12f9e
Cleanup adaptive support code for review
garrettwrong Jun 29, 2021
641ca0f
adjust comment - radius
garrettwrong Jul 2, 2021
4fe5c98
better use of numpy, improve comments
garrettwrong Jul 2, 2021
96f9223
fix typo/bug std/var
garrettwrong Jul 7, 2021
e670cbd
stashing updates, need to find simple way to test F support
garrettwrong Jul 7, 2021
291aa45
use ImageSource and merge two unit tests
garrettwrong Jul 8, 2021
7b9cd19
incorporate testing updates/suggestions
garrettwrong Jul 12, 2021
5a489c7
convert to grid_2d
garrettwrong Aug 9, 2021
dc4ae2c
remove circular import for useless function
garrettwrong Aug 9, 2021
d21d8b3
convert resolution to size in code/docs
garrettwrong Aug 9, 2021
9afbc71
minor changes to hankel, rename inverse_r and change how singularity …
garrettwrong Aug 9, 2021
0baff31
fix typo in adaptivate unit test names
garrettwrong Aug 9, 2021
efc5ae3
move test img_src generation into test functions
garrettwrong Aug 9, 2021
e960d92
tweak formula more for consideration
garrettwrong Aug 9, 2021
647a6c7
revert track normalization term for PSD
garrettwrong Aug 10, 2021
285c075
Revert formula to original author's, adds some logging
garrettwrong Aug 10, 2021
aefc95c
Increase accuracy in adaptive_support
janden Aug 10, 2021
13abcc6
Fix adaptive support Gaussian tests
janden Aug 10, 2021
0bff68a
cleanup contrib code
garrettwrong Aug 11, 2021
d8a0486
Remove superflous unit tests
garrettwrong Aug 11, 2021
e23d885
Rough draft irregular block diagonal extension
garrettwrong Aug 10, 2021
ad2a67d
Extend solve for irregular block diagonal matrices and add ut
garrettwrong Aug 10, 2021
10947c7
Add a few more unit tests (scalars, transpose)
garrettwrong Aug 10, 2021
d995270
Change method name `isregular`~>`_issquare`
garrettwrong Aug 11, 2021
6dc89b9
Unimplement lstsq branch in solve
garrettwrong Aug 11, 2021
0fd3ec9
change `_issquare`~>`is_square`
garrettwrong Aug 17, 2021
294e9bf
fix noise est logging line
garrettwrong Aug 20, 2021
8e8a124
update indices method, break into compute and `.indices`
garrettwrong Aug 27, 2021
fd2c82b
unravel the memoization in fspca coef lookup
garrettwrong Aug 27, 2021
f1c3b4c
change bispectrum_componenent in notebook
garrettwrong Aug 27, 2021
bbe1788
add comment regarding argsort ordering in alignment
garrettwrong Aug 27, 2021
21b4968
change _devel_bispectrum eigvals to Reals
garrettwrong Aug 30, 2021
7ea713b
computation of reflected coef can be done by Conjugation instead of s…
garrettwrong Aug 30, 2021
11dce32
change RIRClass2D to optionally admit Basis; change FSCPA to always c…
garrettwrong Aug 30, 2021
943e084
Fix minor merge conflict in blk_diag_matrix.py
garrettwrong Aug 30, 2021
4b3941d
Allow ArrayImageSource to admit Numpy arrays
j-c-c Aug 31, 2021
1d97347
style reformat
j-c-c Aug 31, 2021
b36f929
Proposed README changeset
garrettwrong Sep 1, 2021
157af4f
fixed typos found in review
garrettwrong Sep 1, 2021
bd2a26a
Added sanity test for ArrayImageSource with numpy array
j-c-c Sep 1, 2021
25e4ec3
Merge pull request #451 from ComputationalCryoEM/fix_readme_450
garrettwrong Sep 2, 2021
b893bef
Merge pull request #411 from ComputationalCryoEM/cls_avg
garrettwrong Sep 2, 2021
8fa2c0d
Fixed punctuation.
j-c-c Sep 2, 2021
b7b49c9
Use the new irregular block diagonal feature.
garrettwrong Sep 3, 2021
9ece7fc
Adds BlkDiagMatrix.rapply and associated matmul, __rmatmul__ methods.
garrettwrong Sep 3, 2021
a307b84
Add tests using `rapply` and `__rmatmul__`
garrettwrong Sep 3, 2021
989fce6
refactored error message and created unit test.
j-c-c Sep 3, 2021
6cf86ac
cleaned up use of ArrayImageSource.
j-c-c Sep 3, 2021
7b8185d
add unit tests to excercise error branches of rapply/__rmatmul__
garrettwrong Sep 3, 2021
31420e4
`np.int` deprecated in favor of `int`
garrettwrong Sep 9, 2021
05fce78
Merge pull request #449 from ComputationalCryoEM/aspire_image_source_403
j-c-c Sep 9, 2021
9866e0a
Merge pull request #452 from ComputationalCryoEM/cls_blk_patch_442
garrettwrong Sep 9, 2021
9b5ac4b
`np.float` deprecated in favor of `float`
garrettwrong Sep 9, 2021
da4d44c
Merge pull request #454 from ComputationalCryoEM/py_39_np_updates
garrettwrong Sep 10, 2021
a072712
fix oversight in `circ` and `inverse_r` centering
garrettwrong Sep 14, 2021
7380a21
Bump version: 0.7.0 → 0.8.0
garrettwrong Sep 14, 2021
11527dd
circ was not using `peak` argument
garrettwrong Sep 16, 2021
482eab5
change variable names to be different than function
garrettwrong Sep 16, 2021
766b3a5
Merge pull request #457 from ComputationalCryoEM/bump_ver
garrettwrong Sep 16, 2021
f2813a2
Merge pull request #456 from ComputationalCryoEM/fix_util_func_bug
garrettwrong Sep 17, 2021
ff22c6c
Pin version of FINUFFT for now
garrettwrong Sep 20, 2021
2f32bb2
Merge pull request #460 from ComputationalCryoEM/pin_finufft_ci
garrettwrong Sep 20, 2021
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.0
current_version = 0.8.0
commit = True
tag = True

Expand Down
13 changes: 12 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# We take the defaults except for treating as informational only.
# This provides feedback without erroring the entire CI pipeline.

coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
ignore:
- "*/tests/*
- "*/tests/*"
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Github Actions Status](https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/workflows/workflow.yml/badge.svg)](https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/workflows/workflow.yml)
[![codecov](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python/branch/master/graph/badge.svg?token=3XFC4VONX0)](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python)

# ASPIRE - Algorithms for Single Particle Reconstruction - v0.7.0
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.8.0

This is the Python version to supersede the [Matlab ASPIRE](https://github.com/PrincetonUniversity/aspire).

Expand Down Expand Up @@ -41,26 +41,26 @@ After cloning this repo, the simplest option is to use Anaconda 64-bit for your
```
cd /path/to/git/clone/folder

# Create's the conda environment and installs base dependencies.
# Creates the conda environment and installs base dependencies.
conda env create -f environment.yml --name aspire_dev

# Enable the environment
conda activate aspire_dev

# Install the aspire package in a locally editable way:
pip install -e .
# Install the aspire package in a locally editable way,
# and additionally installs the developer tools extras:
pip install -e ".[dev]"

```

If you prefer not to use Anaconda, or want to manage environments yourself, you should be able to use `pip` with Python >= 3.6.
Please see the full documentation for details.

You may optionally install additional packages:
You may optionally install additional packages for GPU extensions:

```
# Additional GPU packages (reqires CUDA)
# Additional GPU packages (requires CUDA)
pip install -e ".[gpu]"
# Additional developer tools
pip install -e ".[dev]"
```

### Make sure everything works
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version = "0.7.0"
release = version = "0.8.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Aspire v0.7.0
Aspire v0.8.0
==============

Algorithms for Single Particle Reconstruction
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def read(fname):

setup(
name="aspire",
version="0.7.0",
version="0.8.0",
data_files=[
("", ["src/aspire/config.ini"]),
("", ["src/aspire/logging.conf"]),
Expand All @@ -24,14 +24,15 @@ def read(fname):
author_email="[email protected]",
install_requires=[
"click",
"finufft",
"finufft==2.0.0",
"importlib_resources>=1.0.2",
"joblib",
"matplotlib",
"mrcfile",
"numpy==1.16",
"pandas==0.25.3",
"pyfftw",
"PyWavelets",
"pillow",
"scipy==1.4.0",
"scikit-learn",
Expand Down
2 changes: 1 addition & 1 deletion src/aspire/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from aspire.exceptions import handle_exception

# version in maj.min.bld format
__version__ = "0.7.0"
__version__ = "0.8.0"

# Implements some code that writes out exceptions to 'aspire.err.log'.
config = Config(read_text(aspire, "config.ini"))
Expand Down
35 changes: 32 additions & 3 deletions src/aspire/apple/picking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import warnings
from concurrent import futures

import mrcfile
Expand Down Expand Up @@ -104,8 +105,34 @@ def read_mrc(self):
Micrograph image.
"""

with mrcfile.open(self.filename, mode="r+", permissive=True) as mrc:
im = mrc.data.astype("float")
# mrcfile tends to yield many warnings about EMPIAR datasets being corrupt
# These warnings generally seem benign, and the message could be clearer
# The following code handles the warnings via ASPIRE's logger
with warnings.catch_warnings(record=True) as ws:
# Cause all warnings to always be triggered in this context
warnings.simplefilter("always")

# Try to open the mrcfile
with mrcfile.open(self.filename, mode="r", permissive=True) as mrc:
im = mrc.data.astype("float")

# Log each mrcfile warning to debug log, noting the associated file
for w in ws:
logger.debug(
"In APPLE.picking mrcfile.open reports corruption for"
f" {self.filename} warning: {w.message}"
)

# Log a single warning to user
# Give context and note assocated filename
if len(ws) > 0:
logger.warning(
f"APPLE.picking mrcfile reporting {len(ws)} corruptions."
" Most likely this is a problem with the header contents."
" Details written to debug log."
f" APPLE will attempt to continue processing {self.filename}"
)

self.original_im = im

# Discard outer pixels
Expand All @@ -121,7 +148,9 @@ def read_mrc(self):
size = tuple((np.array(im.shape) / config.apple.mrc_shrink_factor).astype(int))

# Note, float64 required for signal.correlate call accuracy.
im = np.array(Image.fromarray(im).resize(size, Image.BICUBIC), dtype=np.float64)
im = np.asarray(Image.fromarray(im).resize(size, Image.BICUBIC)).astype(
np.float64, copy=False
)

im = signal.correlate(
im,
Expand Down
8 changes: 8 additions & 0 deletions src/aspire/basis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# We'll tell isort not to sort these base classes
# isort: off

from .basis import Basis
from .steerable import SteerableBasis2D

# isort: on

from .dirac import DiracBasis
from .fb_2d import FBBasis2D
from .fb_3d import FBBasis3D
from .ffb_2d import FFBBasis2D
from .ffb_3d import FFBBasis3D
from .fpswf_2d import FPSWFBasis2D
from .fpswf_3d import FPSWFBasis3D
from .fspca import FSPCABasis
from .polar_2d import PolarBasis2D
from .pswf_2d import PSWFBasis2D
from .pswf_3d import PSWFBasis3D
2 changes: 1 addition & 1 deletion src/aspire/basis/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _getfbzeros(self):
(z, np.zeros(max_num_zeros - len(z), dtype=self.dtype))
)

self.r0 = m_reshape(np.hstack(zeros), (-1, self.ell_max + 1))
self.r0 = m_reshape(np.hstack(zeros), (-1, self.ell_max + 1)).astype(self.dtype)

def _build(self):
"""
Expand Down
Loading