Git Product home page Git Product logo

dpscience / dcontinpals Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 4.53 MB

pyDCONTINPALS - A Python program for running the historical FORTRAN code CONTIN-PALS which solves Fredholm integral equations with convoluted exponential decays as kernels of the type that occur in the analysis of Positron Annihilation Lifetime Spectra (PALS).

License: Other

Fortran 79.84% QMake 0.17% C++ 10.13% C 0.45% Python 9.41%
contin lifetime-spectroscopy pals regularization analysis datareduction flm positron-lifetime-spectra positron-annihilation-lifetime exponential-decay

dcontinpals's Introduction

badge-OS badge-OS

Support this project and keep always updated about recent software releases, bug fixes and major improvements by following on github.

badge-followers badge-stars badge-forks

pyDCONTINPALS

badge-OS badge-language badge-license

Copyright (c) 2020-2023 Dr. Danny Petschke ([email protected]). All rights reserved.

pyDCONTINPALS - A program in Python for running the historical FORTRAN code CONTIN-PALS initially provided by Provencher (1982) and Gregory et al. (1990/1991). CONTIN-PALS program solves Fredholm integral equations with convoluted exponential decays as kernels of the type that occur in the analysis of Positron Annihilation Lifetime Spectra (PALS).

demo

Quickstart Guide

pyDCONTINPALS consists of 3 files ...

pyDCONTINPALS.py
pyDCONTINPALSInput.py
pyDCONTINPALSSpecSimulator.py

  • edit the input file pyDCONTINPALSInput.py:
__demoMode                  = True # disable if running from real data

# NOTE: SPECTRUM and IRF (or mono-exponential decay spectrum) data vectors require equal length!

__roi_start                 = 0
__roi_end                   = 7400 # Note: number of channels is internally limited by CONTIN to <= 4000, so adjust the '__binFactor' in order to fit the given number of channels into this range

# file path (and name) to the SPECTRUM data:

__usingRefSpectrum          = True # if set to FALSE the '__irfXXX' related parameters are considered

__filePathSpec              = 'testData/spectrum_10ps.dat'
__specDataDelimiter         = '\t'

# file path (and name) to the IRF data:

__filePathRefOrIRFSpec      = 'testData/ref_10ps.dat'
__refDataDelimiter          = '\t'

# define the number of rows to be skipped during the import of the data (e.g. for ignoring the header entries):

__skipRows                  = 5;

# fixed mono-decay component in units of picoseconds [ps] (1/lambda = tau):

# Note: set to values below 1E-6 if you are providing numerical IRF data as input otherwise the decay rate in [ps]: 

__tau_monoDecaySpec_in_ps   = 182.  # [ps]

# used to model the IRF data in case '__usingRefSpectrum' = False:

__t_zero                    = 2000             # channel number 
__irf_fwhm                  = [270.04,498.63]  # [ps]
__irf_intensity             = [0.9382,0.0618]  # [ps]
__irf_t0                    = [0.,6.6]         # [ps]

# grid of characteristic lifetimes with equally distributed grid points defining the resulting intensity spectrum to be expected as output:

__gridTau_start             = 10.0   # [ps]
__gridTau_stop              = 3000.0 # [ps]
__gridPoints                = 100    # 10 ... 100 Note: this value is internally limited by CONTIN

# channel/bin resolution [ps]:

__channelResolutionInPs     = 10. # >= 10 ... Note: this value is internally limited by CONTIN. If lower, increase '__binFactor' to fit into this range
__binFactor                 = 2   # Note: number of channels is internally limited by CONTIN to <= 4000, so adjust the '__binFactor' in order to fit the given number of channels into this range

# background estimation/calculation region:

__bkgrd_startIndex          = 6500;
__bkgrd_count               = 900; # number of channels with respect to the 'startIndex''
  • execute pyDCONTINPALS.py

  • finished. You should see the results as shown above in the figures when running in the demo mode (__demoMode = True).

How to cite this Program?

DOI

R.B. Gregory, Y. Zhu, Analysis of positron annihilation lifetime data by numerical laplace inversion with the program CONTIN, Nucl. Instruments Methods Phys. Res. Sect. A Accel. Spectrometers, Detect. Assoc. Equip. 290 (1990) 172โ€“182. doi:10.1016/0168-9002(90)90358-D..

  • Additionally, you should cite the applied version of this program in your study.

You can cite all released software versions by using the DOI 10.5281/zenodo.3665474. This DOI represents all versions, and will always resolve to the latest one.

DOI

v1.x

pyDCONTINPALS v1.04
DOI
pyDCONTINPALS v1.03
DOI
pyDCONTINPALS v1.02
DOI
pyDCONTINPALS v1.01
DOI
pyDCONTINPALS v1.0
DOI

License of (py)DCONTINPALS (GNU General Public License)

Copyright (c) 2020-2023 Dr. Danny Petschke ([email protected]) All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details see GNU General Public License v3

dcontinpals's People

Contributors

dpscience avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dcontinpals's Issues

dcontinpals.dll file issue

I have been experiencing this error in these lines of the code, could you tell how to get around it, please?
file_name = 'dcontinpals.dll'
__dllPtr = cdll.LoadLibrary(file_name)

Could not find module 'dcontinpals.dll' (or one of its dependencies). Try using the full path with constructor syntax.

I have also tried to use os to get full path but it didn't 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.