Giter VIP home page Giter VIP logo

pytrax's Introduction

PMEAL Website

Porous Materials Engineering and Analysis Lab Website

This repository hosts the homepage of the PMEAL group. We used to use Wordpress on an Amazon AWS instance, but migrated the site to Github to relieve ourselves of the annoyance of maintaining a web server.

This site is created using quarto. It's quite a powerful and handy tool and probably worth writing a blog post about someday.

pytrax's People

Contributors

bryanwweber avatar tomtranter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pytrax's Issues

Introduce jump probability for grey scale images

It is possible to assign a probability that a movement will take place based on the grey scale value of an image. This is useful for tomography data for materials with variable microporosity that is below the resolution of the image. Whether the grey scale value can always be linked to microporosity is another matter as different materials attenuate differently so composite materials may require some additional segmentation. This concept is proven in the literature and would be useful to implement. Fiedler et. al. have published a few papers on this
https://www.sciencedirect.com/science/article/pii/S0167577X08008446

Purple border around walkers path and solids

Hi there,

Sorry if my question is stupid but I tried to fix it by myself and I just can't. When I use plot_walk_2d, I have a purple border around walkers path as well as around the solid in the image, as you can see in the following pictures.
tau example
porous media example

I would like to know if it is possible to remove this purple border, because in the case of a porous media, the resulting image is really saturated.

Thanks in advance, and have a nice day.

Implement fixed direction stepping for multiple time steps

When a walker hits a wall it is bounced back to where it came from then continues randomly under the assumption of Brownian motion. It would be possible to fix the trajectory after hitting the wall for a certain number of steps to increase the effects of wall interactions as opposed to particle-particle interactions. This could be done either by setting a fixed number of steps or adjusting the probability of moving in a particular direction along a particular axis. The second way is probably better from a physics perspective but might be trickier to implement as it would require storing movement probabilities for each walker.

How to efficiently run in parallel

Hey @TomTranter,

I'm trying to run pytrax in parallel. I already put my script body inside a block:

if __name__ == "__main__":
    # Body

However, I don't get significant speed up when changing the num_proc argument. The image I'm running the simulation on is roughly 200^3 voxels and I use 100,000 walkers and 1,000 time steps. Here are the run times for num_proc = [1, 2, 4, 8] (the machine has 8 physical cores):

Elapsed time in seconds: 33.01
Elapsed time in seconds: 33.29
Elapsed time in seconds: 27.83
Elapsed time in seconds: 25.13

Does asd0, asd1, asd2 means the tortuosity in x,,y,z direction of the 3D image

Hi all,

I have one question related to direction-dependent tortuosity. I calculated tortuosity using 3D image. It gives me msd tortuosity, asd0 tortuosity, asd1 tortuosity, asd2 tortuosity, my question is does asd0, asd1, asd2 means the tortuosity in x,,y,z direction of the 3D image? It bothers me a lot and it would be great if this question can be solved. Thanks a lot!

Wenhui

Doesn't seem to work correctly on 2D images

When I run the code below on a 2D image, the resulting msd vs nsteps lines drop below the straight line at high nsteps. I suspect this is because the code doesn't handle steps in the z direction properly, but am not sure. Like, perhaps steps up and down are added to the step count, but not to the msd? The tortuosity it calculates is also unreasonably high.

import porespy as ps
import pytrax as px
im = ps.generators.blobs(shape=[600, 600])
im= ps.filters.fill_blind_pores(im)
rw = px.RandomWalk(im)
rw.run(nt=100000, nw=1000, stride=10, num_proc=1)
rw.plot_walk_2d()
rw.calc_msd()
rw.plot_msd()

Better parallelization using Dask?

We've had some great success with dask for simple single-machine parallelization. I think the current version uses something a bit problematic right, requiring the script to be in a main section right? Dask does not require any of this.

update example on readme so it works

The example does run due to the failure of parallelpython to run when not in a main loop. We should either update the readme, or fix the code.

Set default number of threads to 0

A default of 0 is probably the best option so that it will always work on every machine, not depending on on parallel python and so on.

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.