-
Notifications
You must be signed in to change notification settings - Fork 98
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
Make SVG plots with substrates easier and more configurable #204
Make SVG plots with substrates easier and more configurable #204
Conversation
Created `set_substrate_dirichlet_activation_vector` to set the `dirichlet_activation_vector` for microenvironment to be the same as for default_microenvironment but not change the `dirichlet_activation_vectors` that track Dirichlet activations for each substrate at each voxel. With this change PhysiCell can robustly and adaptively track which substrates have DCs at any given voxel without further user setup.
added `set_substrate_dirichlet_activation_vector` to class Microenvironment
Fixed random orientation vector selection by using the standardized UniformOnUnitSphere function. Before, the z-value was uniform on [-1,1] which is not the desired uniformity.
reseting my fork
@vincent-noel and @marcorusc Do you anticipate any unexpected effects from this PR? I know that Marco in particular worked a lot on backgroudn coloring functions. |
Follow up: the implementation in studio is already done and passed preliminary testing (just me). Also, I guess I felt like throwing shade at the end there...not sure what prompted that. Sorry to all involved! |
It looks very good to me : more options, simplification of the substrate_coloring_function. Looking at the list of commits, maybe you need to rebase your branch ? seems like many commits are not related to this change (and there are modifications in the readme which probably shouldn't be there). I need to test it, to triple check the existing examples still work, but again, thanks @drbergman, this is nice. |
I just earned the I can go ahead and make sure the readme is the dev branch readme. I probably started from the main branch... |
And since I'll be making changes to this anyways, I'll include the fix in #216 |
Good ! If everything looks good, then you need to force push the rebased branch, and we should see the list of commits updated (and reduced). Let me know if something goes wrong, I can try to help. |
This extends the functionality of plotting substrate heatmaps on SVG output: * Allows for all colormaps permitted in studio for visualizing substrate concentrations * Allows for configuration of this heatmap in the XML configuration file * updates all sample projects so that they can use this functionality just by enabling SVG substrate plots in the XML
5e6c006
to
151e1c6
Compare
the easier solution (for me) was to create a new branch and then create a new PR. seemed safer than trying to make this work and possibly breaking things. See my new PR #219 |
Two main changes being suggested here:
substrate_coloring_function
to the templatemain.cpp
and pass it into the three calls toSVG_plot
so that all projects starting from there can include the substrate plot in SVGs just by configuring via xml or studio. If it is not set,SVG_plot
already cleverly ignores all this, even if not specified. In other words, it should not cause errors.original
. Default, however, isYlOrRd
. The list of colormap names is then {"original","YlOrRd","viridis","turbo","jet","plasma"} as well as any of these with a "_r" appended to indicate it is reversed.Minor change:
substrate_coloring_function
originally returned a vector of 4 strings, probably because it started from thecell_coloring_function
template which uses four colors. However, only one ofsubstrate_coloring_function
were used, so that is now reflected in the code.Most of the lines added are simply the specifications for turbo, jet, and plasma. These have higher resolution because it was when I was adding those that I realized I could easily get Matlab to print out what I needed to specify these colormaps to arbitrary precision. If you edit in VS Code like a 21st century human, you can fold these out of view. Dinosaurs and vim users, I hope your editor-of-choice can do that.
Suggestions are welcome!
If accepted, this will be followed up with corresponding updates to studio.