Skip to main content

Package to access nuclear wave functions and Faddeev- or Yakubovsky components for A=3 and 4 nuclei

Project description

NUCWF

Library for online accessing, reading and writing A=3 and A=4 wave functions.

When using the data files or software, please cite the original work:

Installation

The source code and examples are available at https://jugit.fz-juelich.de/a.nogga/nucwavef.git

The easiest way to install is using pip:

pip install nucwf 

Usage

The package provides an interface to download the data files from our repository and to read the files and test. More advanced options will be documented elsewhere. Jupyter notebook downloading an example data base in examples. This directory also includes some example scripts to modify the database locally.

For downloading specific files to a local directory, e.g., $HOME/work/wftest use

from nucwf import access
testdf=access.database(workdir=os.environ["HOME"]+"/work/wftest")

This downloads a pandas dataframe with the available wave function files and stores it into testdf . The pandas dataframe can be printed using

import pandas as pd  
pd.set_option('display.max_columns', None)
print(testdf.pddf)

Downloading wave function files of, e.g., row 4 and 9 of the table is done by

import os 
# get file info from table 
row=testdf.pddf.loc[[36]]
wfid=row.to_dict('records')[0]
# retrieve file
hashname,uniquename=testdf.get_file(**wfid)
# print name and file size 
print("hashname:    ",hashname)
print("filesize:    ",os.path.getsize(hashname))
print("uniquename:  ",uniquename)

The files are downloaded and gunzipped. They are partly also compressed using the ZFP compressors (see https://github.com/LLNL/zfp). Using the files might require to install the corresponding HDF plugins (https://github.com/LLNL/H5Z-ZFP). The local files will be first stored under their hashname. However, the python method also returns a suggestion for a unique file name uniquename that includes the parameters of the file. If wanted, users may rename the file using the provided uniquename.

The database contains two kinds to files: A=3 and A=4 wave functions. You can read in and get some basic properties using the wavefilea4 constructor

wfa4=access.wavefilea4(hashname,printlevel=1)

A=3 wave functions can be tested similarly using the wavefilea3 constructor

wfa3=access.wavefilea3(hashname,printlevel=1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nucwf-0.0.1.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

nucwf-0.0.1-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file nucwf-0.0.1.tar.gz.

File metadata

  • Download URL: nucwf-0.0.1.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for nucwf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8b5d6b52ea35431a703944543db3245dce7dfd16a46b92a8a4c778cc9d70bc54
MD5 4eb05f691908ba0a0a543bd72549cb5e
BLAKE2b-256 d935f9cada1c9d6f7dd05667e4dda6b40d353648b73ff98bee0a9f627c558e80

See more details on using hashes here.

File details

Details for the file nucwf-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nucwf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for nucwf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0516375a6c18fae421d8047a5baa1ab6f3b9b367cd4775848390e47d6fde4a9
MD5 916c9a892f81d312e8fd348889e9c5ba
BLAKE2b-256 4ee03f518078d0f847a61dd0e5b5ceb2f416ac3c26a96b882e847b1b594cac80

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page