Coder Social home page Coder Social logo

access to setup and in file about plonk HOT 5 CLOSED

dmentipl avatar dmentipl commented on July 1, 2024
access to setup and in file

from plonk.

Comments (5)

dmentipl avatar dmentipl commented on July 1, 2024

Hi @cjfontec, thanks for the suggestion.

When you say that you would like it inside the simulation class, do you mean that you would like to access the properties like sim.properties rather than snap.properties?

This is possible but might cause some issues. For example, in Phantom output snapshots can be modified before continuing a simulation. Say, to add dust to a pre-settle gas calculation. So, then it might not make sense to have the properties on the simulation object as a whole.

With regards to the .setup and .in files from Phantom calculations, I'd prefer not to read them in Plonk. The .setup file is only to generate initial conditions and relies on the version of phantomsetup used. The .in file has Phantom run time options, which are not required for analysis of the data in the snapshots.

I wrote a small Python package for reading and writing Phantom .in and .setup files. See phantom-config.

The number of particles in easily accessed per snapshot via len(snap). And the sink accretion radii: snap.sinks['h'].

Hopefully that makes sense. Let me know if you think that's reasonable. I'm happy to discuss further. If not, I'll close this issue.

from plonk.

cjfontec avatar cjfontec commented on July 1, 2024

Thanks for the answer, it makes perfect sense to not add it to the simulation class. For what I see, your other package does what I wanted. I still think it could be useful as a utility function inside plonk, in order to have the information available, but is fine as it is now. You can close this issue

from plonk.

dmentipl avatar dmentipl commented on July 1, 2024

When you say that it would be useful as a utility function inside Plonk, which part do you mean? Accessing the .in and .setup files? Or, being able to access properties, such as the artificial viscosity and so on, on the simulation object? I do think your idea of accessing more simulation-type properties on the simulation object makes sense.

from plonk.

cjfontec avatar cjfontec commented on July 1, 2024

for the analysis, I don't think is necessary to have full access to the .in and .setup file, is enough to have the simulation properties in the simulation object.

from plonk.

dmentipl avatar dmentipl commented on July 1, 2024

Hi @cjfontec.

I've implemented something like this in 0a950fb.

The idea is that the Simulation object has a properties attribute that has the same info as the Snap object. However, if there is an inconsistency, say udist is not the same in two snapshots then the value in sim.properties is set to '__inconsistent'. For some quantities, such as time, then it is set to a list of the values on the snapshots.

I hope this makes sense. Let me know what you think.

from plonk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.