Skip to content

Refactor write_datasets#8

Merged
maucejo merged 7 commits intomaucejo:mainfrom
Spectrum-Tec:main
Nov 21, 2025
Merged

Refactor write_datasets#8
maucejo merged 7 commits intomaucejo:mainfrom
Spectrum-Tec:main

Conversation

@JakeZw
Copy link
Contributor

@JakeZw JakeZw commented Nov 19, 2025

I did a similar refactor to write_datasets as to parse_datasets, so as to be able to write binary files.

I did this to all filetypes except the 2000 ones, as you were going to work on them.

I did a spotty change to using @scanf in some places, but was not thorough with this. (Time constraints ) It does seem to work well though.

the testing done so far indicates that it is working.

@JakeZw
Copy link
Contributor Author

JakeZw commented Nov 20, 2025

I just did a test where I read in an ASCII uff58 file and wrote it out in binary and then back. I tested all three and the data is \approx equal. So this is gratifying.
I thought I would do the same by going from single to double precision and back but the dataset is immutable so the code would need more logic if we want to do this. At this point I think I will leave well enough alone. This can be added when there is a need, if ever. The only reason I can see is if someone wants to save file size by going to single precision.

The file uff58_nospacing.uff is 6668 KB. When written in binary it is 2002 KB. Nice saving.

I found a bug which I fixed and added some test. The tests need to be made elegant yet.

Copy link
Owner

@maucejo maucejo left a comment

Choose a reason for hiding this comment

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

Hello @JakeZw. Thank you for the PR. I merge it

@maucejo maucejo self-requested a review November 20, 2025 14:07
@maucejo maucejo merged commit ef6756b into maucejo:main Nov 21, 2025
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