Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cellpack/autopack/upy/simularium/simularium_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,9 @@ def writeToFile(self, file_name, bb, recipe_name, version):
n_subpoints[t][n] = 0
n += 1

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

converted_data = TrajectoryData(
meta_data=MetaData(
box_size=np.array(box_size),
Expand Down
2 changes: 1 addition & 1 deletion cellpack/bin/simularium_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def main():
converter.fill_in_empty_fiber_data(time_point_index)
if converter.debug:
print("SUBPOINTS LENGTH", len(converter.subpoints[time_point_index]))
camera_z_position = box_size[2] if box_size[2] > 10 else 100.0
camera_z_position = box_size[2] * 1.5
converted_data = TrajectoryData(
meta_data=MetaData(
box_size=np.array(box_size),
Expand Down
2 changes: 1 addition & 1 deletion examples/recipes/v2/spheres_in_a_box.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[
1000,
1000,
1500
1000
]
],
"objects": {
Expand Down
Loading