Skip to content

Add zbf file export in 2.9 #2321

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

Closed
tomflexcompute opened this issue Mar 17, 2025 · 5 comments · Fixed by #2397
Closed

Add zbf file export in 2.9 #2321

tomflexcompute opened this issue Mar 17, 2025 · 5 comments · Fixed by #2397
Assignees
Labels
2.9 will go into version 2.9.*

Comments

@tomflexcompute
Copy link
Contributor

After discussion with tyler, momchil and all we think it might be worth it to officially add the zbf file export to our stable version in 2.9, even though we can't fully test it. At the same time we can add a warning like "this is an experimental feature, if you encounter any issues with the exported file, please contact us".

@tomflexcompute tomflexcompute added the 2.9 will go into version 2.9.* label Mar 17, 2025
@lucas-flexcompute
Copy link
Collaborator

Sounds great, Tom, but I do not have the bandwidth to work on it. I'm more than happy to help whoever does the integration understand the code, though. It is super straightforward.
@tylerflex can you assign someone else to the issue?

@tylerflex
Copy link
Collaborator

I added @yaugenst-flex to re-assign as needed.

@lucas-flexcompute
Copy link
Collaborator

This is what I created when the request first came up: https://gist.github.com/lucas-flexcompute/ac8f8abc376f51222aad36beacb223ac

@bhnzhang
Copy link

Seems like the hard work has already been done by @lucas-flexcompute, is the task just to integrate his function into the frontend?

What would be a good way to interface with this function? I'm thinking it could be added to monitor objects so a user can call simdata['mon_name'].to_zbf()

@tylerflex
Copy link
Collaborator

Hi @bhnzhang , yes the task is just to integrate this into the frontend. Of course, if you spot anything that might need fixing, feel free to go for it too, but in principle this is just writing a wrapper for what Lucas already implemented.

I think adding a method to FieldData objects is the way to go. Might be worth seeing if any other monitor data could be exported but I don't think so.

A few things to think about while implementing

  1. How can we test this function in the frontend without zemax?
  2. If we can't fully test it, how can we effectively let the user know in case it doesn't work?
  3. Are there any extra options to pass to to_zbf() that will be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 will go into version 2.9.*
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants