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

Save contour files to specified output directory #40

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Save contour files to specified output directory #40

merged 4 commits into from
Dec 12, 2024

Conversation

tianluyuan
Copy link
Contributor

No description provided.

skyreader/plot/plot.py Outdated Show resolved Hide resolved
Comment on lines 838 to 842
# Dump the whole contour
path = unique_id + ".contour.pkl"
path = self.output_dir / f"{unique_id}.contour.pkl"
print("Saving contour to", path)
with open(path, "wb") as f:
pickle.dump(saving_contours, f)
Copy link
Member

Choose a reason for hiding this comment

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

I recommend separating this into a separate helper function. The key indicator is that path is not used beyond this chunk. The same goes for the ascii.write() chunk above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably a good idea. I added a private method to save the contours now.

@tianluyuan tianluyuan merged commit 55e9b2f into main Dec 12, 2024
12 checks passed
@tianluyuan tianluyuan deleted the odir branch December 12, 2024 21:18
@G-Sommani
Copy link
Contributor

Thanks!

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.

3 participants