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

Wrote notebook on synthetic Mosviz image creation #636

Merged
merged 7 commits into from
Jun 23, 2021
Merged

Conversation

ojustino
Copy link
Contributor

I've opened this PR to get this notebook that I wrote with @robelgeda on the record, but please consider it a draft until we hear more from other stakeholders in the JWST data pipeline discussion. I realize the notebook still contains some paths that are specific to my laptop and that the style may not be fully compliant with jdaviz standards.

@github-actions github-actions bot added the documentation Explanation of code and concepts label May 21, 2021
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #636 (b2643c1) into main (2dc49f1) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #636      +/-   ##
==========================================
+ Coverage   59.67%   59.69%   +0.02%     
==========================================
  Files          65       65              
  Lines        4000     4332     +332     
==========================================
+ Hits         2387     2586     +199     
- Misses       1613     1746     +133     
Impacted Files Coverage Δ
jdaviz/cli.py 35.18% <0.00%> (-7.32%) ⬇️
...igs/default/plugins/model_fitting/model_fitting.py 27.30% <0.00%> (-4.33%) ⬇️
jdaviz/app.py 77.23% <0.00%> (-0.74%) ⬇️
jdaviz/configs/imviz/plugins/viewers.py 27.02% <0.00%> (+0.36%) ⬆️
jdaviz/configs/imviz/plugins/parsers.py 98.31% <0.00%> (+1.83%) ⬆️
jdaviz/configs/imviz/plugins/tools.py 43.79% <0.00%> (+2.55%) ⬆️

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 2dc49f1...b2643c1. Read the comment docs.

@pllim pllim added the mosviz label May 21, 2021
@pllim pllim marked this pull request as draft May 21, 2021 19:04
@pllim
Copy link
Contributor

pllim commented May 21, 2021

As per your comment, I converted this PR to draft status. You can convert it back to "ready" when it is ready. FYI.

@ojustino ojustino changed the title Wrote notebook on synthetic MOSviz image creation Wrote notebook on synthetic Mosviz image creation Jun 2, 2021
@ojustino ojustino requested a review from robelgeda June 17, 2021 20:07
@ojustino ojustino marked this pull request as ready for review June 17, 2021 20:10
Copy link
Contributor

@robelgeda robelgeda left a comment

Choose a reason for hiding this comment

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

This is a well written notebook and fulfills the all the requirements requested 🎉

@robelgeda
Copy link
Contributor

codecov fails but this this a notebook so it may not apply

@pllim
Copy link
Contributor

pllim commented Jun 18, 2021

FYI: For the future, please open a PR from a branch on your fork, not on this repo.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Very nice and detailed walkthrough. Thanks!

Branding question: Is it "Mosviz" or "MOSViz" in the narrative doc? Maybe @javerbukh knows. But then again, maybe this is not important to hash out within the "concepts" notebooks.

Disclaimer: I did not run the cells that has %%script and require VPN.

Minor comments below.

Also, the paths are not Windows-friendly but you don't have to do anything about it here; just something I noticed.

notebooks/concepts/generate_mosviz_photometry.ipynb Outdated Show resolved Hide resolved
notebooks/concepts/generate_mosviz_photometry.ipynb Outdated Show resolved Hide resolved
notebooks/concepts/generate_mosviz_photometry.ipynb Outdated Show resolved Hide resolved
notebooks/concepts/generate_mosviz_photometry.ipynb Outdated Show resolved Hide resolved
"metadata": {},
"outputs": [],
"source": [
"%%script false --no-raise-error\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of inserting %%script, why not convert the cell to "raw NBconvert" type instead? That way, when someone wants to run it, they convert it back to actual code cell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are there issues with %%script to be concerned about? I was hoping to preserve those cells' syntax highlighting while also not having them run by default.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is fine if you want to keep them, especially since this is an exploratory notebook.

notebooks/concepts/generate_mosviz_photometry.ipynb Outdated Show resolved Hide resolved
"source": [
"fig, ax = plt.subplots(figsize=(10,10))\n",
"ax.imshow(synth_image, vmin=0, vmax=synth_image.std(), **imshow_params)\n",
"#ax.imshow(synth_image, vmin=0, vmax=synth_image.mean()*3, **imshow_params)\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"#ax.imshow(synth_image, vmin=0, vmax=synth_image.mean()*3, **imshow_params)\n",

@ojustino
Copy link
Contributor Author

@pllim Thanks for the review. My mistake on opening a pull request from upstream -- I actually already have my fork and remote set up and can open a new PR once the notebook is cleared for merging.

I could work on putting the data on Box in order to drop the VPN requirement. I addressed most of your comments in the new commit and left a reply on the last one.

@ojustino ojustino requested a review from PatrickOgle June 23, 2021 18:16
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

I could work on putting the data on Box in order to drop the VPN requirement.

Depends on your audience. If they are all employees, I wouldn't sweat it.

@pllim pllim merged commit 8a0d085 into main Jun 23, 2021
@pllim pllim deleted the synth-mv-imgs branch June 23, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants