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 examples #25

Merged
merged 24 commits into from
Sep 27, 2021
Merged

Add examples #25

merged 24 commits into from
Sep 27, 2021

Conversation

ebezzam
Copy link
Collaborator

@ebezzam ebezzam commented Jun 8, 2021

Will be useful for paper. I've also added some convolution examples and functions, I know this is a point to discuss as @SepandKashani wanted to keep it separate, but I think it might be useful to show such examples in the package so people have something to get inspiration from. Maybe the convolution functions can be moved into the example script rather than in the package?

@ebezzam ebezzam requested a review from SepandKashani July 9, 2021 13:33
setup.cfg Outdated Show resolved Hide resolved
pyffs/util.py Outdated Show resolved Hide resolved
Copy link
Member

@SepandKashani SepandKashani left a comment

Choose a reason for hiding this comment

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

Minor suggestions.
I have some doubts on the API of pyffs/conv.py, but let's go with this for now.

profile/util.py Outdated Show resolved Hide resolved

fname = pathlib.Path(__file__).resolve().parent / "profile_ffsn_2d.png"
fig.savefig(fname, dpi=300)
plt.show()
Copy link
Member

Choose a reason for hiding this comment

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

fig.show()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Perhaps it's my matplotlib settings, but fig.show() doesn't generate a pop-up window with the figure, while plt.show() does.


fname = pathlib.Path(__file__).resolve().parent / "profile_ffs.png"
fig.savefig(fname, dpi=300)
plt.show()
Copy link
Member

Choose a reason for hiding this comment

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

fig.show()

fig.tight_layout()
fig.savefig(os.path.join(fig_path, "profile_convolve2d.png"))

plt.show()
Copy link
Member

Choose a reason for hiding this comment

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

fig.show()

fig.tight_layout()
fig.savefig(os.path.join(fig_path, "bandlimited_interp2d_vary_width.png"))

plt.show()
Copy link
Member

Choose a reason for hiding this comment

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

fig.show()

@@ -0,0 +1,151 @@
import numpy as np
Copy link
Member

Choose a reason for hiding this comment

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

Same comments as examples/interp_1d.py.

examples/util.py Outdated Show resolved Hide resolved
examples/util.py Outdated Show resolved Hide resolved
plt.tight_layout()
plt.savefig(os.path.join(fig_path, "convolve_1d.png"))

plt.show()
Copy link
Member

Choose a reason for hiding this comment

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

fig vs plt.

@@ -0,0 +1,150 @@
import numpy as np
Copy link
Member

Choose a reason for hiding this comment

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

fig vs plt

@ebezzam ebezzam merged commit 29eac7a into imagingofthings:master Sep 27, 2021
@ebezzam ebezzam deleted the task/add_examples branch September 27, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants