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

Write One Block Phantom Files #83

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Conversation

kn8483
Copy link
Contributor

@kn8483 kn8483 commented Jul 2, 2024

This is a preliminary pull request to add functionality to create (write) Phantom files from a Sarracen Data Frame. So far, it is functional for data frames that were generated from a single-block Phantom file - we can write a Phantom file from a single data frame. It appears to fail to recreate an accurate Phantom file from the first block (first data frame produced by read_phantom) of a Phantom file, although, visually when rendering the data frames for comparison, the images appears identical.

Copy link
Owner

@ttricco ttricco left a comment

Choose a reason for hiding this comment

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

Here's a few things that I see quickly. It would be nice to keep large data files out of the repository history if you can clear that. We can fix the unit tests afterward.

from .sarracen_dataframe import SarracenDataFrame

from .interpolate import interpolate_2d, interpolate_2d_line, interpolate_3d_proj, interpolate_3d_cross
from .render import render, streamlines, arrowplot

import sarracen.disc

__version__ = "1.2.3"
__version__ = "1.2.4"
Copy link
Owner

Choose a reason for hiding this comment

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

No need to change the version yet. I do that just before I make an official release.

Copy link
Owner

Choose a reason for hiding this comment

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

Please keep large data files out of the repository. :)

Copy link
Owner

Choose a reason for hiding this comment

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

Please keep large data files out of the repository. :)

Copy link
Owner

Choose a reason for hiding this comment

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

Please keep large data files out of the repository. :)

kn8483 and others added 8 commits July 12, 2024 05:24
…to accept two dataframes. Commented out "tags = [_rename_duplicate(tag) for tag in tags]" in _write_global_header_tags_and_values as it breaks tests. Need to investigate further - massoptype_7 is expected in header vars, but because of duplicated massoftype due to _rename_duplicate(tag), we have massoftype and massoftype_2 (key error). Might not be relevant in real world files?
@ttricco ttricco linked an issue Aug 9, 2024 that may be closed by this pull request
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.

Write Phantom dumps
2 participants