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

Handling different order arguments for sub-calls in fdf reads #841

Open
zerothi opened this issue Oct 10, 2024 · 0 comments
Open

Handling different order arguments for sub-calls in fdf reads #841

zerothi opened this issue Oct 10, 2024 · 0 comments

Comments

@zerothi
Copy link
Owner

zerothi commented Oct 10, 2024

Describe the feature

The problem arises when one reads anything from a fdfSile.

Doing fdf.read_geometry(order="fdf") does not tell how it should fetch the other information that might be associated with the geometry.

This could be solved using contexts, or by passing dictionary like arguments:

fdf.read_geometry(order=[..., {"read_lattice" | "lattice": ["fdf"]}]

or similar.
This can get quite complicated since it isn't clear which routines are called. (track is your friend here).

A context manager could resolve this:

with fdf.set_order(lattice=["fdf"], geometry="TSHS", nsc=None) as fdf_context:
    geom = fdf_context.read_geometry(...)
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

No branches or pull requests

1 participant