Giter Site home page Giter Site logo

jaminmartin / pyet-mc Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4.67 MB

Collection of routines for modelling the energy transfer processes in lanthanide doped materials.

License: GNU General Public License v3.0

Python 98.43% Rust 1.57%
physics rare-earths spectroscopy lanthanides rare-earth-ions

pyet-mc's People

Contributors

jaminmartin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pyet-mc's Issues

New plotting backend doesn't work on Linux.

The new Qt5+Qt5WebEngine plotting backend does not seem to work correctly on Linux (Ubuntu 22.04). It simply renders a white screen. The plots them selves are correctly created in the systems /tmp folder and are viewable in a regular browser.

Suspected cause: current PyQt5 library via anaconda / pip for Linux.

When installing PyQt5 directly to the operating system using apt and using the default python3, not through anaconda (highly not recommended) the plots are able to be viewed via the QtWebEngine.

I do not have this issue on MacOS (14). However it is using mini conda and conda-forge as its main repository. I will test this on a fresh Linux system and try replicate the MacOS results.

In the meantime, just use matplotlib for plotting. The ‘scatter_xyandtransient` plot methods can be easily recreated. The more advanced structure plots will remain as a fallback option for Linux users until this is resolved.

inclusion of rust backend breaks fitting

The way the rust backed is imported and checked against in wrss leads to crashing

NameError: name 'general_energy_transfer_para' is not defined. Did you mean: 'general_energy_transfer'?`

cif file names not in cache

File names not being in the cache in any form can lead to a situation where pyet thinks there is a cached calculation already in place.

Performance

Due to the number of exponential calculations (particularly for large time series), the performance is relatively lacklustre. This could be improved using either Numba or writing slow functions in Rust. I have implemented one of the functions. This saw a 2x speed up on Numpy (there is little performance boost as both call the same system level c library for the specific hardware). It did show improved memory usage and did not crash for large arrays as the current Numpy version does.

I will likely provide an option for a rust backend for all functions.

It's not working with the current CIF file from the material project

I downloaded the cif file of the crystal structure through the material project, and when I ran the code, it was not working and showing " AttributeError: 'Structure' object has no attribute 'site' " . There are two types of cif, cif and cif(symmetrized) on material project, both are not working.

Fit logging and summaries

It would be desirable to have a log file generated at the end of the fit.

This should include what was done, file names for data, quality of fit etc.

It would also be possible to append the experimental data at the end of the file so that if the file was structured in terms of the number of datasets and what was used for each one, a small utility could be written to quickly load in the data, plot it + the fitted results in real time rather than having to re-run fits.

Data sets of different lengths

When fitting to multiple traces, there is a chance they are not all the same length. In its current form, the optimisation algorithm will be biased towards fitting to the dataset with the largest least squares objective. This can be solved in the following ways.

  • Truncate all data sets to the shortest traces provided by sampling N equally spaced data points from a larger trace
  • Normalise the least squares error to the smallest data set.

Will update when this has been resolved

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.