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

Retrieve ATLConfocalSettingDefinition per image #37

Merged
merged 2 commits into from
Nov 24, 2021
Merged

Retrieve ATLConfocalSettingDefinition per image #37

merged 2 commits into from
Nov 24, 2021

Conversation

tmtenbrink
Copy link
Contributor

Hi, thanks for your library!

I'm currently doing data processing on STED images where I need some information from the ATLConfocalSettingDefinition. I could parse the XML seperately and then try to match them to the images generated with readlif, but I feel like this approach is cleaner.

ATLConfocalSettingDefinition is located inside of the XML of each Image. It contains useful information like NumericalAperture and Magnification. This PR adds its attributes as a dict to the LifImage class (as self.settings).

Possible drawbacks:

  • This is a very specific feature.
    "ATLConfocalSettingDefinition" seems to exist in all the test files. However, if you think this is too specific, maybe instead I could create an option (when creating the LifFile) that allows the full XML data per Image to be added to the LifImage object, which would allow users to then parse this manually. That would at least solve the issue of separately going through the whole tree and matching the XML to the images.

I've added documentation and a very simple test as well.

@nimne
Copy link
Contributor

nimne commented Nov 18, 2021

Thanks for the PR, this actually helps with a problem indicated in #18.

After testing this out for a while - I really do think your solution is great. The change is limited in scope, and the 'ATLConfocalSettingDefinition' tag has a lot of useful and necessary information. If future XML parsing is needed, that would probably be added under a different attribute. settings seems to explain exactly what is contained in the ATLConfocalSettingDefinition tag.

I'll get the version numbers updated and push this to pypi in the next day or two.

In the future, this package may be released under the MIT license. While the code would currently be under the GPL, do I have permission to relicense this in the future?

Thanks!

@tmtenbrink
Copy link
Contributor Author

Thanks for the reply! Happy you think it's useful. You definitely have permission to relicense, yes.

Cheers.

@nimne nimne merged commit 555e5d2 into Arcadia-Science:master Nov 24, 2021
@nimne
Copy link
Contributor

nimne commented Nov 24, 2021

v0.6.5 with this change is now up on pypi - thanks for the PR!

@tmtenbrink
Copy link
Contributor Author

No problem, thank you for merging!

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