Conversation
ascibisz
left a comment
There was a problem hiding this comment.
I tested by running this locally as the server with cellpack-client and it looks good!
One question I'll just want to verify before we deploy it to cellpack-server: should we upload new default result files for the recipes in cellpack studio with these camera positions too? Otherwise, you go from a much more zoomed out view to a more zoomed in view when your Re-run completes
Good call! I'll go ahead test the results with smaller windows one more time. If everything looks nice, I'll upload them to |
|
@mogres now z position now uses
|
mogres
left a comment
There was a problem hiding this comment.
Tested the example packings and the visualizations look good!
Some of them are still maybe a bit too far, but we can adjust the camera position as needed later. For some of our example recipes, we could bump up the number of packed spheres to make it visually more appealing, but that's for another PR.
| camera_z_position = box_size[2] if box_size[2] > 10 else 100.0 | ||
| # use max dimension to make sure camera captures entire scene | ||
| max_box_dimension = max(box_size) | ||
| camera_z_position = max_box_dimension * 2.5 |
There was a problem hiding this comment.
Good workaround! For the future maybe we can reduce this multiplier or have it as a parameter because some of the packings still look too far away. We also can set the camera x position to 0 instead to avoid hard coded numbers.



Problem
we need to adjust the camera position for simularium results
Solution
updated
camera_z_positioninsimularium_helper.pyper Saurabh's suggestionfound similar camera position calculation in
cellpack/bin/simularium_converter.py, updated that as well for consistency. The code can be DRYer long termreverted the
bounding_boxvalue inexamples/recipes/v2/spheres_in_a_box.jsonso spheres are packed within the full box as expectedrevised display names and descriptions for editable fields (in firebase)
result updated in cellPACK Studio, verify the production site or see screenshot (in firebase)
this is the initial view of multiple sphere result, still close to the camera but better than before, and the bounding box is correct
with @mogres
Type of change