Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
edbosne committed Aug 20, 2021
1 parent 96cc8e7 commit 7c4ea7b
Show file tree
Hide file tree
Showing 17 changed files with 43,885 additions and 56,859 deletions.
36,959 changes: 15,454 additions & 21,505 deletions examples/Library_explorer.html
100755 → 100644

Large diffs are not rendered by default.

12,703 changes: 1,208 additions & 11,495 deletions examples/Library_explorer.ipynb

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions examples/Library_explorer.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#!/usr/bin/env python
# coding: utf-8

# # Library explorer
Expand All @@ -8,11 +8,11 @@

# In[1]:

get_ipython().magic('matplotlib inline')

get_ipython().run_line_magic('matplotlib', 'inline')

#import sys
#sys.path.append("/home/eric/PycharmProjects/PyFDD")
#from pyfdd import Lib2dl
#sys.path.append("/home/eric/cernbox/PyCharm/PyFDD/")
import pyfdd
print('PyFDD version', pyfdd.__version__)

Expand All @@ -25,33 +25,35 @@

pd.set_option('display.max_rows', 10000)
pd.set_option('display.max_columns', 500)
pd.set_option('display.max_colwidth', -1)
pd.set_option('display.max_colwidth', None)


# ## Import library
#

# In[2]:

analysis_path = "/home/eric/cernbox/University/CERN-projects/Betapix/Analysis/Channeling_analysis/"
lib_path = os.path.join(analysis_path, "FDD_libraries/GaN_24Na/ue488g20.2dl")

analysis_path = "../test_pyfdd/data_files"
lib_path = os.path.join(analysis_path, "sb600g05.2dl")
lib = pyfdd.Lib2dl(lib_path)
df = pd.DataFrame(data=lib.get_simulations_list(),
columns=["Spectrum number",
"Spectrum_description",
"factor",
"u2",
"sigma"])
#for entry in lib.sim_list:


# In[3]:


lib.print_header()


# In[4]:


display(df)


Expand All @@ -61,12 +63,14 @@

# In[5]:


patt_number = 1


# In[6]:

get_ipython().magic('matplotlib inline')

get_ipython().run_line_magic('matplotlib', 'inline')
imgmat = lib.get_simulation_patt(patt_number)
plt.figure(dpi=150)
plt.contourf(imgmat)
Expand All @@ -77,3 +81,4 @@




Loading

0 comments on commit 7c4ea7b

Please sign in to comment.