<jupyter_start><jupyter_text>Plot effective range expansion data  This notebook presents how to load the generated data into a `pandas.DataFrame` and how to visualize it.  Init<jupyter_code>import os

import pandas as pd

import seaborn as sns
import matplotlib.pylab as plt

from luescher_nd.database.utilities import read_table<jupyter_output><empty_output><jupyter_text>Below you can find different `sqlite` database files which store the generated data, e.g., eigenvalues.The title describes how the data was generated.For example:String | Meaning | Options---|---|---`contact-fitted` | A contact interaction was used | `contact-fitted` `a-inv=...` | Physical value of the inverse scattering length | `-5.0` and `0.0``zeta=...` | The zeta function which was used to determine the groundstate to fit the interaction | `spherical`, `cartesian` and `dispersion``projector=...` | The projector used to filter out unwanted states | `parity` and `a1g``n-eigs==...` | The number of eigenvalues extract during diagonalization | `200`<jupyter_code>DATA_DIR = os.path.join(os.getcwd(), os.pardir, "data")
FILES = [el for el in os.listdir(DATA_DIR) if el.endswith(".sqlite")]

FILES<jupyter_output><empty_output><jupyter_text>Read Data First we load the data into memory<jupyter_code>print(read_table.__doc__)
a_inv = "-5.0"
zeta = "dispersion"
projector = "a1g"
n_eigs = 200


DB_NAME = f"contact-fitted_a-inv={a_inv}_zeta={zeta}_projector={projector}_n-eigs={n_eigs}.sqlite"

df = read_table(os.path.join(DATA_DIR, DB_NAME), zeta=zeta, filter_degeneracy=True)
df.head()<jupyter_output><empty_output><jupyter_text>Plot Data Specify grid properties<jupyter_code>row = "L"
hue = "epsilon"
col = "nstep"
col_order = df.nstep.unique()
x = "x"
y = "y"<jupyter_output><empty_output><jupyter_text>Specify data ranges<jupyter_code>query = "x > -5 and x < 20"<jupyter_output><empty_output><jupyter_text>and plot<jupyter_code>tf = df.query(query).sort_values("x")

grid = sns.FacetGrid(
    data=tf,
    col=col,
    hue=hue,
    row=row,
    sharex="row",
    sharey="row",
    legend_out=True,
    palette="cubehelix",
    margin_titles=True,
    col_order=col_order
)

grid.map(plt.plot, x, y, ms=3, lw=0.5, ls="--", marker="s")

for ax in grid.axes.flatten():
    # ax.set_ylim(-6, -4)
    pass

grid.fig.set_dpi(200)
grid.add_legend(frameon=False)

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13624894869638352, 'fraction_numerical': 0.010513036164844407, 'mean_word_length': 5.327127659574468, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '283872', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 899, 'n_tokens_neox': 868, 'n_words': 207, 'path': 'notebooks/example.ipynb', 'repo_name': 'ckoerber/luescher-nd', 'size': '2378'}