Comments (5)
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.
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.
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.
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.
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)
- Automate building the Conda and pip packages with Travis CI
- Add convenience function to generate movies HOT 6
- Add Snap method to set units to physical quantities
- Read more Phantom header quantities
- Add function to modify snaps and write a new one
- Should the 'id' array be 'particle_type'? HOT 1
- Sink particles are not rotated with `snap.rotate`
- plonk.visualize.plot passes colorbar_kwargs to imshow HOT 2
- Plot dust density for one-fluid dump HOT 2
- Incorrect temperature with phantom models with ieos=2 HOT 7
- Animation is broken HOT 1
- Creating arbitrary cross sections through SPH data HOT 4
- plonk.visualize has no attribute 'render' HOT 4
- Only the first profile in list is plotted HOT 4
- Error in Column density plots when using logarithmic colour bar. HOT 2
- Change from splash.py to sph-interp
- Add support for more Phantom equations of state
- TypeError: expected dtype object, got 'numpy.dtype[float64]' when animating HOT 7
- Shifting to the centre of the disc HOT 3
- Tracking individual particles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plonk.