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

Use an arbitrary function to set up radial gradient #217

Open
mogres opened this issue Jan 3, 2024 · 1 comment
Open

Use an arbitrary function to set up radial gradient #217

mogres opened this issue Jan 3, 2024 · 1 comment

Comments

@mogres
Copy link
Collaborator

mogres commented Jan 3, 2024

Use Case

This functionality will be useful to recreate observed radial distributions of punctate structures such as peroxisomes and endosomes.

avg_PILR_squeezed

Solution

This could be implemented as a new gradient mode

  1. Get user input as a single valued function of distance from a surface. This input should ideally vary between 0 and 1 indicating the scaled distance between the nucleus and the membrane
  2. Calculate weights for grid points based on this function
  3. Use these weights to set up a gradient and pack objects based on these weights

Considerations

We need to account for differences in number of grid points as a function of radial distance. Even if the weight for all grid points is the same, points farther away from the nucleus are more likely to be selected simply because there are more grid points available.

Perhaps we can correct for this by adding a factor to the original weights

Another alternative would be to select a weight first, then select a random grid point with that given weight

@mogres
Copy link
Collaborator Author

mogres commented Jan 12, 2024

Added a point picking mode which implements the considerations above

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant