danieljprice / splash

SPLASH is an interactive visualisation and plotting tool using kernel interpolation, mainly used for Smoothed Particle Hydrodynamics simulations
https://splash-viz.readthedocs.io
GNU General Public License v2.0
55 stars 43 forks source link

Splash doesn't open Gandalf binary #50

Closed Francyrad closed 2 years ago

Francyrad commented 3 years ago

Dear professor Daniel Price

I attach you some binaries produced by the SPH code Gandalf

I tired to open them with: splash -f seren FREEFALL1.su.* . However it gives only this errors:

plash.defaults not found: using default settings 22 filenames read from command line ----------------------- FREEFALL1.su.00001 ----------------------- ERROR OPENING FREEFALL1.su.00001 AS ASCII - WRONG FILE FORMAT

No data: You may choose from the options below

That's very strange. I've no idea why this problem happens honestly... FREEFALL1.su.zip

Let me know.. Francesco

danieljprice commented 3 years ago

Had a look at this. The issue here is that the Seren format has changed to SERENBINARYDUMPV3, which is not yet supported in splash. I have made some changes to the read so that we can at least read the header information successfully, but I need more information about this format in order to support it properly, e.g. the Gandalf routine that writes the files, information about the structure etc. At the moment I just get garbage from trying to read the main body with the v2.0 reader.

Also, I'm guessing one of the Gandalf developers might have already written a read routine for the v3.0 format, if so you might want to ask them to get it incorporated back into the official splash? Or at least confirm it doesn't already exist before we have to write the routine ourselves?

SJaffa commented 3 years ago

Hi @Francyrad or @danieljprice could you please take down that last comment with the link to my files. They were shared for personal use of @Francyrad, not for public release. Thanks

SJaffa commented 3 years ago

@Francyrad if you set Gandalf to write ascii files (Seren format/sf) rather than binary files (Seren binary/su) then Splash should be able to read them. If there is some reason you don't want to use ascii (they are bigger than binary so if you have limited storage and are doing a really big simulation) then you or someone will have to put in a significant amount of work to make a new read method for Splash so it can read the new binary format. As far as I know Gandalf isn't actively developed anymore but contact the emails listed on their README to check if they can help.

danieljprice commented 3 years ago

it's not a lot of work to adapt the format, but I need a copy of the subroutine that writes it to be able to know what to read. I can read the header successfully but not the contents