GithubHelp home page GithubHelp logo

uob-positron-imaging-centre / up4 Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 0.0 93 MB

Post-processor for particle data.

Home Page: https://uob-positron-imaging-centre.github.io/up4/

License: GNU General Public License v3.0

Shell 0.06% Python 10.03% Rust 89.91%
granular postprocessing

up4's People

Contributors

dan-weston avatar danw97 avatar dwerner95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

up4's Issues

Windows.

I successfully ran up4 on windows using the rust-standalone version.
One needs to install HDF5 (link) on windows and make sure that the bin folder is in PATH (which it should be automatically).

The main function in src/main.rs runs flawlessly and also plots the rotating drum (after some tweaks).

installing it in python works, however for some reason the HDF5-rust crate is not able to write a file.

pyo3_runtime.PanicException: Unable to create hdf5 File: Invalid file access property list id: 792633534417207322

@DanW97 can you try to reproduce this error? if so, i will raise an issue on HDF5-rust as I can not find anything online

Tutorial for 'Data Visualisation' doesn't work

Hi, trying to use up4 to visualise velocity fields, noticed the tutorial code doesn't work, even with the test file provided. I think one of the commands has been changed from vector_field to vectorfield, and an index is required for the command vec_field_plotter.unit_vector_plot, but when i make those two changes, I still get an error saying argument 'axis': 'builtins.VectorGrid' object cannot be interpreted as an integer.

Dataset comparison

I am thinking of a way to compare datasets easier.
A function that allows the qualitative comparison between any function implemented in uPPPP with any dataset.
Example:

import uppp
simulation = uppp.Data("simulation.hdf5")
experiment = uppp.Data("experiment.hdf5")
experiment.compare(function = uppp.velocityfield, dataset=simulation, kwargs=...)

Return type/plot of this would be a cell by cell coomparison of a field (1D, 2D, or 3D) like this plot:

scatterplot2

where both axis show the value of the individual cell (velocity for example) and a straight line would mean that the cells are the same.

Problem would be that experiments normally do not overlap spatially with the simulation. hence we would need to translate the whole dataset and we would need to automatically do that.

DW: quiver func QoL improvements

  1. Implement global, min-max and elementwise scaling of u and v data
  2. Remove hardcoded axis formatting
  3. Add option/enum structs for titles, axis labels and ranges
  4. Investigate colourbar addition
  5. Enable square plots

Nomenclature

the ndarray crate uses the Dim type(?) (or it's an enum) and we also do, which leads to some very confusing type/syntax hinting from rust-analyzer. It would be more ergonomic to rename the enum to provide a clearer rust API for the user

HDF5 Attributes

We found that the HSM_Glass_2l_250.hdf5 file lacked the required "Dimension" attribute which broke a lot of the testing aspects of the vtk converter. Raising this issue so that we can keep aware of this in case there is an underlying problem to hdf5 file generation.

Velocity scalar and velocity vector fields are flipped

1 6VVM_VelVectorXZ_Slice
1 6VVM_VelScalarXZ_Slice

The attached files show a velocity vector and a velocity scalar field in the same plane at the same location. As seen by the heatmap, the velocities are flipped about the centre of the image. This is true for all data in any axis view.

NaN behaviour definition

Old version of uPPPP (pyAnalyser) does not define behaviour for NaN -positions/velocities given from experimental data such as PEPT. Result is a invalid field for example here:
drawing

There are valid positions in the sections without data, however a single NaN makes the field invalid.
We must check for NaNs when implementing the old functions in the new version

Issue with 2D scalar field - offset

new_667_200mm_vel_cs_xy_plane
667_200mm_vel_cs_xy_plane

The latest update of the software has had an issue where the scalar fields have become offset. Image 1 is a new plot, image 2 is the old plot - both of scalar velocity in the XY plane. The data seems to be offset in both of the axes. Furthermore, the data seems to show different colours at some cells - perhaps indicating a change in the way velocity has been calculated?

uPPPP name

There is a lot confusion going on whether the name should be uPPPP or uPPP or what else.
The name of the framework will be Universal Post-Processor for Particulate Processes, hence 4 Ps make sense. however that is a bit much to type in python. (e.g import upppp)
Hence I propose "up4" or, which sounds even better "up3" (Universal Post-Processor for Particulate Processes)

Please let me know what your thoughts about that !

grid.collapse returns NaNs when granular temperature is initiated with grid containing values.

Following code returns a field of NaNs

import up4
import numpy as np

data = up4.Data("test.hdf5")
grid = up4.Grid(data)
velfield = data.velocityfield(grid)

gran_temp_field = data.granular_temperature(field)
gran_temp_2d= gran_temp_field.collapse(0)

print(np.isnan(gran_temp_2d).all())

## returns True

While it is not the way the grid should be used, this bug should not happen.
gran_temp_field contains numbers that are not NaN, the grid.collapse() function should be able to produce a proper field. (slices work)

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.