mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 12:03:42 +02:00
Merge branch 'develop' into documentation
This commit is contained in:
commit
0a7b12f37d
3 changed files with 32 additions and 31 deletions
10
.github/workflows/pytest.yml
vendored
10
.github/workflows/pytest.yml
vendored
|
@ -11,11 +11,17 @@ on:
|
|||
|
||||
jobs:
|
||||
pytest:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||
include:
|
||||
- os: macos-latest
|
||||
python-version: 3.9
|
||||
- os: windows-latest
|
||||
python-version: 3.9
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
|
|
|
@ -25,14 +25,21 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Primary observables"
|
||||
"In this example we look at the analysis of the current quark mass (PCAC mass) on a test gauge field ensemble with fixed Schrödinger functional boundary conditions in the temporal direction."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We can load data from preprocessed files which contains lists of `pyerror` `Obs` and convert them to `Corr` objects. We use the parameters `padding_front` and `padding_back` to keep track of the fixed boundary conditions at both temporal ends of the lattice."
|
||||
"## Loading data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We can load data from preprocessed files which contains lists of `pyerror` `Obs` and convert them to `Corr` objects as explained in the previous example. We use the parameters `padding_front` and `padding_back` to keep track of the fixed boundary conditions at both temporal ends of the lattice. This allows us to specify absolut temporal positions without having to keep track of any shifts in the data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -107,7 +114,12 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"For the PCAC mass we now need to obtain the first derivative of f_A and the second derivative of f_P"
|
||||
"The PCAC mass is defined as\n",
|
||||
"\\begin{align*}\n",
|
||||
"am(x_0)=\\frac{a\\tilde{\\partial}_0 f_\\mathrm{A}(x_0)+a^2c_\\mathrm{A}\\partial_0^{\\ast}\\partial_0^{}f_\\mathrm{P}(x_0)}{2f_\\mathrm{P}(x_0)}+\\mathrm{O}(a^2)\\,.\n",
|
||||
"\\end{align*}\n",
|
||||
"\n",
|
||||
"We now need to obtain the first derivative of f_A and the second derivative of f_P"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -176,26 +188,6 @@
|
|||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"24"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"am_pcac_impr.T"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
|
@ -230,7 +222,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
@ -263,7 +255,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
@ -292,8 +284,10 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"execution_count": 12,
|
||||
"metadata": {
|
||||
"scrolled": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
|
@ -321,10 +315,11 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pcac_plateau.tag = \"O(a) improved PCAC mass extracted on the test ensemble\"\n",
|
||||
"pe.input.json.dump_to_json(pcac_plateau, \"pcac_plateau_test_ensemble\")"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -74,7 +74,7 @@ class Corr:
|
|||
|
||||
@property
|
||||
def reweighted(self):
|
||||
bool_array = np.array([list(map(lambda x: x.reweighted, o)) for o in list(filter(None.__ne__, self.content))])
|
||||
bool_array = np.array([list(map(lambda x: x.reweighted, o)) for o in [x for x in self.content if x is not None]])
|
||||
if np.all(bool_array == 1):
|
||||
return True
|
||||
elif np.all(bool_array == 0):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue