Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3D gaussian Gauss3 object #29

Merged
merged 4 commits into from
Jul 4, 2022
Merged

Add 3D gaussian Gauss3 object #29

merged 4 commits into from
Jul 4, 2022

Conversation

JeffFessler
Copy link
Member

And some minor tweaks elsewhere.

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #29 (e183215) into main (4443978) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #29   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        13    +1     
  Lines          422       439   +17     
=========================================
+ Hits           422       439   +17     
Impacted Files Coverage Δ
src/gauss2.jl 100.00% <ø> (ø)
src/gauss3.jl 100.00% <100.00%> (ø)

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 4edaa3b...e183215. Read the comment docs.

value::Number = 1,
)
(cx, cy, cz, wx, wy, wz) = promote(cx, cy, cz, wx, wy, wz)
Object(Gauss3(), (cx,cy,cz), (wx,wy,wz), (Φ, Θ), value)

Choose a reason for hiding this comment

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

I guess this is already designed this way so there's no need to change. In some sense, it's just a matter of taste.

But generally speaking as a side comment, people would expect this constructor function to create a Gauss3 object, and the following fact would be a bit confusing from time to time:

Gauss3() isa Guass3 # true
Gauss3(...) isa Gauss3 # false

Speaking of this particular issue, the lower case normal function gauss3 is more appropriate because it's allowed to return something not Gauss3.

Copy link
Member Author

@JeffFessler JeffFessler Jul 4, 2022

Choose a reason for hiding this comment

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

I really appreciate this feedback because I find it confusing too!
This package is still in 0.0.x stage so I am open to modifying it to make it more "usual."
I was attempting to follow what base does with round but probably I didn't match it properly:
https://github.com/JuliaLang/julia/blob/742b9abb4dd4621b667ec5bb3434b8b3602f96fd/base/rounding.jl#L52

Would you recommend simply changing to lower case gauss3 and ellipsoid etc., or is there a better overall way?

BTW, I still plan to merge this particular PR (because it matches the rest of the current package design), but I can consider your suggestion in a separate PR that could change it across the board.

You could add a note to the related issue I opened #30

@JeffFessler JeffFessler marked this pull request as ready for review July 4, 2022 16:38
@JeffFessler JeffFessler merged commit 8378cae into main Jul 4, 2022
@JeffFessler JeffFessler deleted the gauss3 branch July 4, 2022 16:39
@JeffFessler JeffFessler mentioned this pull request Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants