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

Created notebook on plotting galaxies #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ojustino
Copy link
Contributor

An adaptation of Mark SubbaRao's notebook on plotting galaxies through Cosmicflows-2.

@pkgw
Copy link
Contributor

pkgw commented Mar 25, 2019

Is this blocked on any bugs or missing features in pywwt?

One thing I noticed is that I don't think the PV color mapping is working right. The plt.cm.magma() function either takes floats, in which case they should range between 0.0 and 1.0, or integers, in which case they should range between 0 and 255. Currently the peculiar velocities are rounded to integers, but they range from large negative to large positive values, so a lot of the color mappings clip. The inputs should be normalized first. The first thing I'd try is finding the largest absolute value, M = max(np.abs(cosmic_flows['PV'])), and then applying a linear transformation such that -M maps to 0 and +M maps to 1.0.

@ojustino
Copy link
Contributor Author

ojustino commented Mar 25, 2019

I don't think this is blocked on anything missing in pywwt.

Thanks for the catch on plt.cm.magma. I'll apply the transformation and also test to see if galactic mode is working the way I expect given issue 184 in the pywwt repo.

@ojustino
Copy link
Contributor Author

*If things are OK once that's done, please let me know before you merge so I can remove my comments to self.

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