Skip to content

Extra columns from separate file via "--extracols" flag#87

Open
themikelau wants to merge 4 commits into
danieljprice:mainfrom
themikelau:extras
Open

Extra columns from separate file via "--extracols" flag#87
themikelau wants to merge 4 commits into
danieljprice:mainfrom
themikelau:extras

Conversation

@themikelau

Copy link
Copy Markdown
Contributor

For a long time, particle quantities computed outside splash have been read through a "hack" where they are disguised as "divv" columns. These changes aim for a proper implementation and here is a summary:

  • For a dump file dump_01234, an extra quantity, e.g. etot, can be written to a separate unformatted file of the form dump_01234.etot.extras.
  • This file is read using the --extracols flag, e.g., splash dump_01234 --extracols=etot. For more than one extra quantity, stored in separate .extra files, a comma-separated list can be provided to --extracols. The corresponding environment variable is SPLASH_EXTRACOLS.
  • The extra column will appear as, following the example, etot, in splash.

Other than being a proper implementation, compared to the "divv hack", this implementation allows arbitrarily many extra columns to be read (instead of just four), and properly labels the extra columns and so the user doesn't forget what quantities were calculated in a ".divv file". With these changes, we could also probably get rid of code that is specific for reading divv and curlv data.

@danieljprice

Copy link
Copy Markdown
Owner

Hi Mike,

This functionality already exists, via an ascii file called dump_01234.cols or .comp, with one row per particle and however many columns you want to add as columns.

Also no need for a flag, just looks for the file if it exists... please try this to see if the existing functionality works

Best wishes,

Daniel

@themikelau

Copy link
Copy Markdown
Contributor Author

Thanks I will try that.

@themikelau

Copy link
Copy Markdown
Contributor Author

@danieljprice I think it is still useful to have this functionality to read extra columns from binary files and with separate files for different columns. Could we merge this?

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