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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

themikelau
Copy link
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
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
Contributor Author

Thanks I will try that.

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