Skip to content

Conversation

@j-c-c
Copy link
Collaborator

@j-c-c j-c-c commented Feb 8, 2022

This resolves issue #560. While creating a PolarBasis2D object self.nrad calls on self.nres prior to self.nres being initialized.

@j-c-c j-c-c added the bug Something isn't working label Feb 8, 2022
@j-c-c j-c-c self-assigned this Feb 8, 2022
@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #561 (ef91777) into develop (9c36782) will increase coverage by 0.25%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #561      +/-   ##
===========================================
+ Coverage    87.16%   87.42%   +0.25%     
===========================================
  Files          108      108              
  Lines         7979     8172     +193     
===========================================
+ Hits          6955     7144     +189     
- Misses        1024     1028       +4     
Impacted Files Coverage Δ
src/aspire/basis/polar_2d.py 86.20% <50.00%> (ø)
src/aspire/source/simulation.py 99.58% <0.00%> (+0.21%) ⬆️
src/aspire/source/image.py 95.71% <0.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c36782...ef91777. Read the comment docs.

@j-c-c j-c-c requested a review from chris-langfield February 8, 2022 19:58
chris-langfield
chris-langfield previously approved these changes Feb 9, 2022
Copy link
Collaborator

@chris-langfield chris-langfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in person:

doing

self.nrad = size[0] // 2

is another option, but the repeated class variable is already done with ndim, so for readability's sake I like this solution. Could add the default values for nrad and ntheta to the docstring as well. Thanks!

@j-c-c
Copy link
Collaborator Author

j-c-c commented Feb 11, 2022

Thanks @chris-langfield! Added defaults to the docstring and moved the assignment of default values for nrad and ntheta into _build() as we discussed.

@j-c-c j-c-c marked this pull request as ready for review February 11, 2022 16:30
@j-c-c j-c-c requested a review from janden as a code owner February 11, 2022 16:30
Currently only square images are supported.
:param nrad: The number of points in the radial dimension.
:param ntheta: The number of points in the angular dimension.
:param nrad: The number of points in the radial dimension. Default is resoltuion // 2.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolution

@j-c-c j-c-c merged commit 717e19d into develop Feb 14, 2022
@j-c-c j-c-c deleted the polar_2d_560 branch February 14, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants