html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/1265#issuecomment-280422799,https://api.github.com/repos/pydata/xarray/issues/1265,280422799,MDEyOklzc3VlQ29tbWVudDI4MDQyMjc5OQ==,10928117,2017-02-16T18:51:30Z,2017-02-16T18:51:30Z,NONE,"Hi, I tried to came with a bit more interesting but still simple example
```python
from itertools import product
import numpy as np
import pandas as pd
import holoviews as hv
hv.notebook_extension()
def energies(L, a):
k = np.pi * np.arange(1, L//a) / L
return {'exact': k**2, 'approx': 2*(1 - np.cos(k * a)) / a**2}
L = np.arange(10, 21, 2)
a = np.array([1, .5, .25])
data = []
for Li, ai in product(L, a):
output = dict(L=Li, a=ai)
output.update(**energies(Li, ai))
data.append(output)
df = pd.DataFrame(data)
hmap_data = {}
for n, row in df.iterrows():
key = row.L, row.a
val = (hv.Points((np.arange(len(row.exact)), row.exact), kdims=['n', 'E']) *
hv.Points((np.arange(len(row.approx)), row.approx), kdims=['n', 'E']))
hmap_data[key] = val
hv.HoloMap(hmap_data, kdims=['L', 'a']).select(n=(0, 20), E=(0, 20))
```
example is simple and don't include any serious simulation. I compare here energies of particle in 1D box vs what would came out from tight-binding simulation. Example is very simple but it captures situation that happens often when calculating spectrum of a finite system: for different system size we get different amount of energy levels.
That simple example is manageable without any pandas or xarray machinery but imagine real simulation made with [kwant](https://kwant-project.org/) for series of different input parameters (system dimensions, gate voltages, chemical potentials, etc...)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207283854
https://github.com/pydata/xarray/issues/1265#issuecomment-279514589,https://api.github.com/repos/pydata/xarray/issues/1265,279514589,MDEyOklzc3VlQ29tbWVudDI3OTUxNDU4OQ==,10928117,2017-02-13T20:37:48Z,2017-02-13T20:37:48Z,NONE,I believe that this is a common problem in simulation of quantum mechanical problems. I will try to come with a bit more realistic / practical example that I hope will help with choosing the best solution.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207283854