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

Added support for individual point sizes (radii) #28

Merged
merged 17 commits into from
Jan 30, 2025

Conversation

vschwarze
Copy link
Contributor

Added the support to read and write individual point sizes. They are stored as an array inside a PointSize object that can be found inside the Contourobjects. Indices of the point size array correspond with the indices of the point coordinates. Point sizes are stored in pixel coordinates.

@vschwarze vschwarze changed the title Added support for individual point sises (radii) Added support for individual point sizes (radii) Jan 29, 2025
Copy link
Collaborator

@alisterburt alisterburt left a comment

Choose a reason for hiding this comment

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

Great work here @vschwarze !

  • I like that the models in models.py mirror the binary spec and PointSize is a departure from this -> given that it has only a single field let's remove that class
  • the name psizes doesn't mirror anything in the binary spec so let's simply call it point_sizes and make it a numpy array
  • could you add tests covering the new functionality?

Once these changes are done we can merge here and cut a release 🙂

src/imodmodel/models.py Outdated Show resolved Hide resolved
src/imodmodel/models.py Outdated Show resolved Hide resolved
src/imodmodel/parsers.py Outdated Show resolved Hide resolved
src/imodmodel/writers.py Outdated Show resolved Hide resolved
src/imodmodel/writers.py Outdated Show resolved Hide resolved
@alisterburt
Copy link
Collaborator

@vschwarze as an aside - a bunch of us who contribute to these packages have a zulip channel for chatting and meet 4 times a year to discuss what we're working on. If you're interested in being involved please join over at https://imagesc.zulipchat.com/#narrow/channel/426493-TeamTomo and write a quick message introducing yourself :-)

@vschwarze
Copy link
Contributor Author

Hi @alisterburt,

I implemented your suggestions and added some basic tests and provided a test file. And I will have a look at your zulip channel.

3 similar comments
@vschwarze
Copy link
Contributor Author

Hi @alisterburt,

I implemented your suggestions and added some basic tests and provided a test file. And I will have a look at your zulip channel.

@vschwarze
Copy link
Contributor Author

Hi @alisterburt,

I implemented your suggestions and added some basic tests and provided a test file. And I will have a look at your zulip channel.

@vschwarze
Copy link
Contributor Author

Hi @alisterburt,

I implemented your suggestions and added some basic tests and provided a test file. And I will have a look at your zulip channel.

tests/conftest.py Outdated Show resolved Hide resolved
@alisterburt
Copy link
Collaborator

@vschwarze congratulations on your first PR! 🥳 Great work and thanks for taking the time

I'll push this out as imodmodel v0.0.15 now

@alisterburt alisterburt merged commit 4ac0766 into teamtomo:main Jan 30, 2025
5 checks passed
@alisterburt
Copy link
Collaborator

v0.0.15 will be on PyPI once this has finished https://github.com/teamtomo/imodmodel/actions/runs/13058463816

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