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

Added Fresnel integrals #398 #407

Closed
wants to merge 15 commits into from
Closed

Conversation

curio-sitas
Copy link

@curio-sitas curio-sitas commented Jul 11, 2022

Added Fresnel integrals from https://github.com/kiranshila/FresnelIntegrals.jl. As suggested in #398

Added 3 functions with docs :

  • Fresnelc(z)
  • Fresnels(z)
  • Fresnnel(z) = (Fresnelc(z),Fresnels(z))

Tests were added too

@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #407 (08ed9e9) into master (36c547b) will increase coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
+ Coverage   93.63%   93.76%   +0.12%     
==========================================
  Files          12       13       +1     
  Lines        2767     2822      +55     
==========================================
+ Hits         2591     2646      +55     
  Misses        176      176              
Flag Coverage Δ
unittests 93.76% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/SpecialFunctions.jl 100.00% <ø> (ø)
src/fresnel.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 36c547b...08ed9e9. Read the comment docs.

Added the test for the function fresnel(z) for codecov
@curio-sitas
Copy link
Author

Added the last test for the function fresnel(z::Number) for full code coverage (codecov)

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Unfortunately, I'm not sure if it will be merged since we have been hesitant with adding functionality to SpecialFunctions that already exists in other packages. Also here one could just load FresnelIntegrals, and it seems it's not necessary to include these functions in SpecialFunctions.

Nevertheless, I added comments and suggested some improvements. Even if this PR is not merged it might be useful to contribute those to FresnelIntegrals.

src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
src/fresnel.jl Outdated Show resolved Hide resolved
@curio-sitas
Copy link
Author

Thanks for the review. I used to think it was a good idea to enrich the current package since it is a global SpecialFunctions collection.

I will take your reviews into account in my next commit and may open a PR on the original repo.

curio-sitas and others added 13 commits July 15, 2022 20:44
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Functions have been renamed :
- fresnel -> fresnelsincos
- fresnelc -> fresnelcos
- fresnels -> fresnelsin

Corrected backslash (invalid escape sequence) in docstrings
- Added tests
- Corrected sign errors in the functions
curio-sitas added a commit to curio-sitas/FresnelIntegrals.jl that referenced this pull request Jul 15, 2022
Added tests
Reformulated functions, and added lighter ones for real numbers as suggested in JuliaMath/SpecialFunctions.jl#407
@curio-sitas
Copy link
Author

  • Sign errors were corrected and some tests added (comparison with QuadGK.jl).

All above is also proposed in a PR on the original repo (FresnelIntegrals.jl).

@devmotion
Copy link
Member

@curio-sitas I guess this PR can be closed now since the PR in FresnelIntegrals.jl was merged and released in version 0.2?

@curio-sitas
Copy link
Author

Yes you can close it !

@devmotion devmotion closed this Dec 12, 2023
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