mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
Merge pull request #32 from jkuhl-uni/feature/input_2.0
Feature/input 2.0
This commit is contained in:
commit
c76e8b8bad
4 changed files with 777 additions and 270 deletions
136
tests/input_test.ipynb
Normal file
136
tests/input_test.ipynb
Normal file
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This file is used for testing some of the input methods."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,sys,inspect\n",
|
||||
"current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n",
|
||||
"parent_dir = os.path.dirname(current_dir)\n",
|
||||
"sys.path.insert(0, parent_dir) \n",
|
||||
"\n",
|
||||
"import pyerrors as pe\n",
|
||||
"import pyerrors.input.openQCD as qcdin\n",
|
||||
"import pyerrors.input.sfcf as sfin\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"First, we will have a look at the input method for the topological charge $Q_{top}$, which is measured by the program ms from the openQCD package. For now, this part still in the making and depends on an actual file. Later, this should be changed to a more efficient way of making a proper input file.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['T29L20k0.13719r2.ms.dat', 'T29L20k0.13719r3.ms.dat', 'T29L20k0.13719r1.ms.dat', 'T29L20k0.13719r4.ms.dat']\n",
|
||||
"dn: 10\n",
|
||||
"nn: 60\n",
|
||||
"tmax: 30\n",
|
||||
"eps: 0.02\n",
|
||||
"max_t: 12.0\n",
|
||||
"t_aim: 6.125\n",
|
||||
"index_aim: 31\n",
|
||||
"T29L20k0.13719r2\n",
|
||||
"dn: 10\n",
|
||||
"nn: 60\n",
|
||||
"tmax: 30\n",
|
||||
"eps: 0.02\n",
|
||||
"max_t: 12.0\n",
|
||||
"t_aim: 6.125\n",
|
||||
"index_aim: 31\n",
|
||||
"T29L20k0.13719r3\n",
|
||||
"dn: 10\n",
|
||||
"nn: 60\n",
|
||||
"tmax: 30\n",
|
||||
"eps: 0.02\n",
|
||||
"max_t: 12.0\n",
|
||||
"t_aim: 6.125\n",
|
||||
"index_aim: 31\n",
|
||||
"T29L20k0.13719r1\n",
|
||||
"dn: 10\n",
|
||||
"nn: 60\n",
|
||||
"tmax: 30\n",
|
||||
"eps: 0.02\n",
|
||||
"max_t: 12.0\n",
|
||||
"t_aim: 6.125\n",
|
||||
"index_aim: 31\n",
|
||||
"T29L20k0.13719r4\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"r_qtop = qcdin.read_qtop(\"../../test_data\", prefix = \"T29L20k0.13719\",full = True, r_stop = [500,440,447,410])#, files = [\"T29L20k0.13719r1.ms.dat\"], )"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'T29L20k0.13719|r1': 500, 'T29L20k0.13719|r2': 440, 'T29L20k0.13719|r3': 447, 'T29L20k0.13719|r4': 410}\n",
|
||||
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(r_qtop.shape)\n",
|
||||
"#print(r_qtop.deltas['T29L20k0.13719|r1'])\n",
|
||||
"for i in r_qtop.deltas['T29L20k0.13719|r2']:\n",
|
||||
" print(round(r_qtop.value + i), end =\" \")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"interpreter": {
|
||||
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 64-bit",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
},
|
||||
"orig_nbformat": 4
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue