diff --git a/.ipynb_checkpoints/ptychoScopy-checkpoint.ipynb b/.ipynb_checkpoints/ptychoScopy_v1.0-checkpoint.ipynb
similarity index 97%
rename from .ipynb_checkpoints/ptychoScopy-checkpoint.ipynb
rename to .ipynb_checkpoints/ptychoScopy_v1.0-checkpoint.ipynb
index c3ca43d..bf7548b 100644
--- a/.ipynb_checkpoints/ptychoScopy-checkpoint.ipynb
+++ b/.ipynb_checkpoints/ptychoScopy_v1.0-checkpoint.ipynb
@@ -5,7 +5,7 @@
"id": "cfe429ad-a3da-4b34-a78d-2828fcfe5f49",
"metadata": {},
"source": [
- ""
+ "
"
]
},
{
@@ -13,7 +13,7 @@
"id": "7ad928f6-e3a8-4a1b-a9a2-1d5993374d9a",
"metadata": {},
"source": [
- " Code @ Radim Skoupý, PSI Villigen 2024"
+ " Code @ Radim Skoupý, PSI Villigen 2024"
]
},
{
@@ -40,7 +40,7 @@
},
{
"cell_type": "code",
- "execution_count": 168,
+ "execution_count": 2,
"id": "5c5feaae-861c-4277-9dd5-aee373b3c174",
"metadata": {
"editable": true,
@@ -53,7 +53,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "62ad0e0212ce422b9bacb692b014942a",
+ "model_id": "aac473c7796d44cea247b93ae124a142",
"version_major": 2,
"version_minor": 0
},
@@ -79,10 +79,19 @@
},
{
"cell_type": "code",
- "execution_count": 167,
+ "execution_count": 1,
"id": "fecbecdb-0fac-4ac8-a2b3-1ccb3f869a77",
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\skoupy_r\\AppData\\Local\\anaconda3\\envs\\all\\lib\\site-packages\\pandas\\core\\computation\\expressions.py:21: UserWarning: Pandas requires version '2.8.0' or newer of 'numexpr' (version '2.7.3' currently installed).\n",
+ " from pandas.core.computation.check import NUMEXPR_INSTALLED\n"
+ ]
+ }
+ ],
"source": [
"### Initial packages import\n",
"import io\n",
@@ -113,8 +122,8 @@
"image = open(\"ptychoscopy/logo.png\", \"rb\").read()\n",
"logo = widg.Image(value=image, format='png', layout=widg.Layout(grid_area='logo',width='95%',))\n",
"ali = dict(style = {'description_width': '110px','button_width': '55px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
- "ali2 = dict(style = {'description_width': '60px' ,'button_width': '90px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
- "ali3 = dict(style = {'description_width': '110px','button_width': '49.2px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
+ "\n",
+ "ali3 = dict(style = {'description_width': '110px','button_width': '59.5px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
"method = widg.ToggleButtons(options=[('SSB ','ssb'),('ITR ','iterative')],description='',icons=['opera','refresh'], tooltips=['Single side band ptychography', 'Iterative reconstruction methods (e.g. PIE, ML, DM)'],\n",
" layout=widg.Layout(width='97.5%', grid_area='methods'), style = {'button_width': '48%','font_weight': 'bold'}, button_style='', disabled = False)\n",
"\n",
@@ -123,32 +132,33 @@
"beam_energy = widg.SelectionSlider(options=pty.load_energies(), value=200, description='Beam energy (keV)', layout=widg.Layout(width='95%', grid_area='beam_set1'), **ali)\n",
"probe_size_list = pty.load_probes()\n",
"probe_size = widg.Dropdown(options=probe_size_list, value=probe_size_list[1], description='Probe', layout=widg.Layout(width='95%', grid_area='beam_set3'), **ali)\n",
- "probe_size_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set5'))\n",
+ "probe_size_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set5'))\n",
"defocus = widg.FloatSlider(description='Defocus (nm)', value=0, min=0, max=2500, step=5, readout_format='d',continuous_update=False, layout=widg.Layout(width='95%', grid_area='beam_set4'), **ali)\n",
"aperture_name = widg.Label(value = 'Aperture', layout=widg.Layout(width='95%', grid_area='aperture_name'),)\n",
"aperture_list = pty.load_apertures()\n",
"aperture = widg.Dropdown(options=aperture_list, description='Aperture', value=aperture_list[1], layout=widg.Layout(width='95%', grid_area='beam_set2'), **ali)\n",
- "aperture_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set6'))\n",
+ "aperture_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set6'))\n",
"\n",
"### Scanning parameters\n",
"scanning_set = widg.Button(description='Scanning parameters', layout=widg.Layout(width='95%', grid_area='scanning_set'),style=widg.ButtonStyle(button_color='#3b446b', font_weight= 'bold',font_size= '16px',text_color='white'),disabled = False)\n",
"mag = widg.Dropdown(options=pty.load_magnifications(), value=20, description='Magnification Mx', layout=widg.Layout(width='95%', grid_area='scanning_set1'), **ali)\n",
- "step_ma = widg.BoundedFloatText(value=0, step = 0.01, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set7'))\n",
+ "step_ma = widg.BoundedFloatText(value=0, step = 0.01, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set7'))\n",
"\n",
"matrix_list = pty.load_mappings()\n",
- "matrix = widg.Dropdown(options=matrix_list, value=matrix_list[4], description='Scanning matrix', layout=widg.Layout(width='95%', grid_area='scanning_set2'), **ali)\n",
+ "matrix = widg.Dropdown(options=matrix_list, value=matrix_list[4], description='Scanning matrix', layout=widg.Layout(width='94%', grid_area='scanning_set2'), **ali)\n",
"dwell_time = widg.SelectionSlider(options=pty.load_dwelltimes(), value=10, description='Dwell time (μs)', layout=widg.Layout(width='95%', grid_area='scanning_set3'), **ali)\n",
"\n",
"### Detection\n",
"camera_set = widg.Button(description='Detection',layout=widg.Layout(width='95%', grid_area='camera_set'),style=widg.ButtonStyle(button_color='#3b446b', font_weight= 'bold',font_size= '16px',text_color='white'),disabled = False)\n",
"cl_name = widg.Label(value = 'Nominal CL (cm)',layout=widg.Layout(width='95%', grid_area='cl_name'),)\n",
"cl = widg.ToggleButtons(options=pty.load_cameralengths(aperture, \"nominal\"), value=8, description='', layout=widg.Layout(width='95%', grid_area='cl_set1'), **ali3)\n",
- "camera_name = widg.Label(value = 'Detector',layout=widg.Layout(width='95%', grid_area='camera_name'),)\n",
- "camera = widg.ToggleButtons(options=pty.load_detectors(), description='', layout=widg.Layout(width='95%', grid_area='camera_set1'), style = {'description_width': '60px','button_width': str(100/len(pty.load_detectors())-len(pty.load_detectors()))+'%', 'font_weight': 'bold'}, button_style='')\n",
+ "\n",
+ "camera_name = widg.Label(value = 'Detector', layout=widg.Layout(width='94%', grid_area='camera_name'),)\n",
+ "camera = widg.Dropdown(options=pty.load_detectors(), description='', layout=widg.Layout(width='93%', grid_area='camera_set1'))\n",
"restr_name = widg.Label(value = 'PAAR',layout=widg.Layout(width='350px', grid_area='restr_name'))\n",
"restr = widg.ToggleButtons(options=[('.',False), ('',True)], value = False, description='',icons = ['ban','check'], layout=widg.Layout(width='95%', grid_area='camera_set2'),style = {'description_width': '80px','button_width': '48%', 'font_weight': 'bold'}, button_style='')\n",
"binning_name = widg.Label(value = 'Binning',layout=widg.Layout(width='95%', grid_area='binning_name'))\n",
- "binning = widg.ToggleButtons(options=[('',1), ('2',2), ('4',4), ('8',8), ('16',16)], value=1, description='', icons = ['ban','','','',''], layout=widg.Layout(width='95%', grid_area='camera_set3'), **ali3)\n",
+ "binning = widg.ToggleButtons(options=[('',1), ('2',2), ('4',4), ('8',8)], value=1, description='', icons = ['ban','','','',''], layout=widg.Layout(width='95%', grid_area='camera_set3'), **ali3)\n",
"camera_set6 = widg.Button(description='Post-acquisition treatments (ITR)',layout=widg.Layout(width='95%', grid_area='camera_set6'),style=widg.ButtonStyle(button_color='white', font_size= '16px',text_color='black'),disabled = False)\n",
"padding = widg.SelectionSlider(options=[('none',1), ('double',2), ('triple',3), ('quadruple',4), ('quintuple',5)], value=1, description='Padding', continuous_update=False, orientation='horizontal', readout=True, layout=widg.Layout(width='95%', grid_area='camera_set4'), **ali)\n",
"pattern_resto = widg.SelectionSlider(options=[('none',1), ('double',2), ('triple',3), ('quadruple',4), ('quintuple',5)], value=1, description='Pattern recovery', continuous_update=False, orientation='horizontal', readout=True, layout=widg.Layout(width='95%', grid_area='camera_set5'), **ali)\n",
@@ -159,30 +169,29 @@
"aperture.observe(show_corrprobe_angle, names='value') \n",
"\n",
"### Visualisation\n",
- "visual_set = widg.Button(description='Visualisation',layout=widg.Layout(width=perc95, grid_area='visual_set'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',font_size= '16px',text_color='black'),disabled = False)\n",
+ "visual_set = widg.Button(description='Visualisation',layout=widg.Layout(width='95%', grid_area='visual_set'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',font_size= '16px',text_color='black'),disabled = False)\n",
"name1 = widg.Button(description='Scale (%)',layout=widg.Layout(width='95%', grid_area='name1'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',text_color='black'), disabled = False)\n",
"graph_size = widg.IntSlider(value=100,min=75,max=125,step=5, description='', layout=widg.Layout(width='95%', grid_area='gr_size2'), button_style='primary',disabled=False,)\n",
"\n",
"### Layout\n",
- "controls = widg.GridBox(children=[logo, method, beam_energy, beam_set, aperture, probe_size, defocus, scanning_set, mag, matrix, dwell_time, cl, camera_set, camera, camera_name, restr_name, restr, binning_name,\n",
- " binning, aperture_res, aperture_res2, graph_size, name1, visual_set, padding, pattern_resto, camera_set6, probe_size_ma, aperture_ma, step_ma,cl_name],\n",
- " layout=widg.Layout(width='355px', grid_template_rows='90px 40px 35px 35px 35px 35px 35px 30px 30px 35px 35px 35px 35px 62px 35px 35px 35px 35px 35px 95px 35px 35px 35px', grid_template_columns='20% 10% 30% 15% 25%', grid_template_areas='''\n",
+ "controls = widg.GridBox(children=[logo, method, beam_energy, beam_set, aperture, probe_size, defocus, scanning_set, mag, matrix, dwell_time, cl, camera_set, camera, restr_name, restr, binning_name,\n",
+ " binning, aperture_res, aperture_res2, graph_size, name1, visual_set, padding, pattern_resto, camera_set6, probe_size_ma, aperture_ma, step_ma,cl_name, camera_name],\n",
+ " layout=widg.Layout(width='325px', grid_template_rows='90px 40px 35px 35px 35px 35px 35px 30px 30px 35px 35px 35px 35px 35px 62px 35px 35px 35px 35px 95px 35px 35px 35px', grid_template_columns='22% 8% 30% 20% 25%', grid_template_areas='''\n",
" \"logo logo logo logo logo \" \n",
" \"methods methods methods methods methods \"\n",
" \"beam_set beam_set beam_set beam_set beam_set \" \n",
" \"beam_set1 beam_set1 beam_set1 beam_set1 beam_set1 \"\n",
- " \"beam_set4 beam_set4 beam_set4 beam_set4 beam_set4 \"\n",
+ " \"beam_set4 beam_set4 beam_set4 beam_set4 beam_set4 \"\n",
" \"beam_set3 beam_set3 beam_set3 beam_set3 beam_set5 \"\n",
" \"beam_set2 beam_set2 beam_set2 beam_set2 beam_set6 \"\n",
" \". sidebar2 sidebar2 sidebar2 sidebar5 \"\n",
- "\n",
" \"scanning_set scanning_set scanning_set scanning_set scanning_set \" \n",
" \"scanning_set1 scanning_set1 scanning_set1 scanning_set1 beam_set7\"\n",
" \"scanning_set2 scanning_set2 scanning_set2 scanning_set2 scanning_set2\"\n",
" \"scanning_set3 scanning_set3 scanning_set3 scanning_set3 scanning_set3\"\n",
" \"camera_set camera_set camera_set camera_set camera_set \"\n",
- " \"cl_name cl_set1 cl_set1 cl_set1 cl_set1 \"\n",
" \"camera_name camera_set1 camera_set1 camera_set1 camera_set1 \"\n",
+ " \"cl_name cl_set1 cl_set1 cl_set1 cl_set1 \"\n",
" \"restr_name camera_set2 camera_set2 camera_set2 camera_set2 \"\n",
" \"binning_name camera_set3 camera_set3 camera_set3 camera_set3 \"\n",
" \"camera_set6 camera_set6 camera_set6 camera_set6 camera_set6\"\n",
@@ -406,12 +415,12 @@
" fig1.add_annotation(x=-2*step_size_corr, y=-1*step_size_corr, ax=-2*step_size_corr, ay=-2*step_size_corr, xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='red')\n",
" fig1.add_annotation(x=2*step_size_corr-0.75*beam_diameter/2, y=-2*step_size_corr-0.75*beam_diameter/2, ax=2*step_size_corr, ay=-2*step_size_corr,xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='blue')\n",
" fig1.add_annotation(x=2*step_size_corr+0.75*beam_diameter/2, y=-2*step_size_corr+0.75*beam_diameter/2, ax=2*step_size_corr, ay=-2*step_size_corr,xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='blue')\n",
- " fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='red', name='ΔR '+str(np.round(10*step_size_corr,2))+' Å')) \n",
+ " fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='red', name='ΔR '+str(np.round(10*step_size_corr,3))+' Å')) \n",
" fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='blue', name='Probe ⌀ '+str(np.round(10*beam_diameter,2))+' Å')) \n",
"\n",
" match method: \n",
" case 'ssb':\n",
- " fig1.add_trace(go.Scatter(showlegend=True, x=(0,0), y=(0,0),marker_size=12, marker_color='green', name= 'ΔR_SSB ' + str(np.round(dRssb,2))+' Å', opacity = 0)) \n",
+ " fig1.add_trace(go.Scatter(showlegend=True, x=(0,0), y=(0,0),marker_size=12, marker_color='green', name= 'ΔR_SSB ' + str(np.round(dRssb,3))+' Å', opacity = 0)) \n",
" fig1.update_layout(width=3.15*graph_size, height=3.9*graph_size, plot_bgcolor='white', margin = dict(l=0.65*graph_size, r=0.01*graph_size, t=0.8*graph_size, b=0.7*graph_size),\n",
" legend = dict(orientation=\"v\",yanchor=\"bottom\",y=1.01, xanchor=\"right\",x=1), title = {'text': \"Sample\",'y': 0.87, 'x': 0.23,'xanchor': 'left','yanchor': 'top'})\n",
" case 'iterative':\n",
@@ -776,7 +785,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.5"
+ "version": "3.10.13"
},
"varInspector": {
"cols": {
diff --git a/ptychoScopy.ipynb b/ptychoScopy_v1.0.ipynb
similarity index 97%
rename from ptychoScopy.ipynb
rename to ptychoScopy_v1.0.ipynb
index c3ca43d..bf7548b 100644
--- a/ptychoScopy.ipynb
+++ b/ptychoScopy_v1.0.ipynb
@@ -5,7 +5,7 @@
"id": "cfe429ad-a3da-4b34-a78d-2828fcfe5f49",
"metadata": {},
"source": [
- ""
+ "
"
]
},
{
@@ -13,7 +13,7 @@
"id": "7ad928f6-e3a8-4a1b-a9a2-1d5993374d9a",
"metadata": {},
"source": [
- " Code @ Radim Skoupý, PSI Villigen 2024"
+ " Code @ Radim Skoupý, PSI Villigen 2024"
]
},
{
@@ -40,7 +40,7 @@
},
{
"cell_type": "code",
- "execution_count": 168,
+ "execution_count": 2,
"id": "5c5feaae-861c-4277-9dd5-aee373b3c174",
"metadata": {
"editable": true,
@@ -53,7 +53,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "62ad0e0212ce422b9bacb692b014942a",
+ "model_id": "aac473c7796d44cea247b93ae124a142",
"version_major": 2,
"version_minor": 0
},
@@ -79,10 +79,19 @@
},
{
"cell_type": "code",
- "execution_count": 167,
+ "execution_count": 1,
"id": "fecbecdb-0fac-4ac8-a2b3-1ccb3f869a77",
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\skoupy_r\\AppData\\Local\\anaconda3\\envs\\all\\lib\\site-packages\\pandas\\core\\computation\\expressions.py:21: UserWarning: Pandas requires version '2.8.0' or newer of 'numexpr' (version '2.7.3' currently installed).\n",
+ " from pandas.core.computation.check import NUMEXPR_INSTALLED\n"
+ ]
+ }
+ ],
"source": [
"### Initial packages import\n",
"import io\n",
@@ -113,8 +122,8 @@
"image = open(\"ptychoscopy/logo.png\", \"rb\").read()\n",
"logo = widg.Image(value=image, format='png', layout=widg.Layout(grid_area='logo',width='95%',))\n",
"ali = dict(style = {'description_width': '110px','button_width': '55px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
- "ali2 = dict(style = {'description_width': '60px' ,'button_width': '90px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
- "ali3 = dict(style = {'description_width': '110px','button_width': '49.2px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
+ "\n",
+ "ali3 = dict(style = {'description_width': '110px','button_width': '59.5px', 'font_weight': 'bold'}, button_style='', disabled = False)\n",
"method = widg.ToggleButtons(options=[('SSB ','ssb'),('ITR ','iterative')],description='',icons=['opera','refresh'], tooltips=['Single side band ptychography', 'Iterative reconstruction methods (e.g. PIE, ML, DM)'],\n",
" layout=widg.Layout(width='97.5%', grid_area='methods'), style = {'button_width': '48%','font_weight': 'bold'}, button_style='', disabled = False)\n",
"\n",
@@ -123,32 +132,33 @@
"beam_energy = widg.SelectionSlider(options=pty.load_energies(), value=200, description='Beam energy (keV)', layout=widg.Layout(width='95%', grid_area='beam_set1'), **ali)\n",
"probe_size_list = pty.load_probes()\n",
"probe_size = widg.Dropdown(options=probe_size_list, value=probe_size_list[1], description='Probe', layout=widg.Layout(width='95%', grid_area='beam_set3'), **ali)\n",
- "probe_size_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set5'))\n",
+ "probe_size_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set5'))\n",
"defocus = widg.FloatSlider(description='Defocus (nm)', value=0, min=0, max=2500, step=5, readout_format='d',continuous_update=False, layout=widg.Layout(width='95%', grid_area='beam_set4'), **ali)\n",
"aperture_name = widg.Label(value = 'Aperture', layout=widg.Layout(width='95%', grid_area='aperture_name'),)\n",
"aperture_list = pty.load_apertures()\n",
"aperture = widg.Dropdown(options=aperture_list, description='Aperture', value=aperture_list[1], layout=widg.Layout(width='95%', grid_area='beam_set2'), **ali)\n",
- "aperture_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set6'))\n",
+ "aperture_ma = widg.BoundedFloatText(value=0, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set6'))\n",
"\n",
"### Scanning parameters\n",
"scanning_set = widg.Button(description='Scanning parameters', layout=widg.Layout(width='95%', grid_area='scanning_set'),style=widg.ButtonStyle(button_color='#3b446b', font_weight= 'bold',font_size= '16px',text_color='white'),disabled = False)\n",
"mag = widg.Dropdown(options=pty.load_magnifications(), value=20, description='Magnification Mx', layout=widg.Layout(width='95%', grid_area='scanning_set1'), **ali)\n",
- "step_ma = widg.BoundedFloatText(value=0, step = 0.01, description='', min=0, disabled=False, layout=widg.Layout(width='80%', grid_area='beam_set7'))\n",
+ "step_ma = widg.BoundedFloatText(value=0, step = 0.01, description='', min=0, disabled=False, layout=widg.Layout(width='75%', grid_area='beam_set7'))\n",
"\n",
"matrix_list = pty.load_mappings()\n",
- "matrix = widg.Dropdown(options=matrix_list, value=matrix_list[4], description='Scanning matrix', layout=widg.Layout(width='95%', grid_area='scanning_set2'), **ali)\n",
+ "matrix = widg.Dropdown(options=matrix_list, value=matrix_list[4], description='Scanning matrix', layout=widg.Layout(width='94%', grid_area='scanning_set2'), **ali)\n",
"dwell_time = widg.SelectionSlider(options=pty.load_dwelltimes(), value=10, description='Dwell time (μs)', layout=widg.Layout(width='95%', grid_area='scanning_set3'), **ali)\n",
"\n",
"### Detection\n",
"camera_set = widg.Button(description='Detection',layout=widg.Layout(width='95%', grid_area='camera_set'),style=widg.ButtonStyle(button_color='#3b446b', font_weight= 'bold',font_size= '16px',text_color='white'),disabled = False)\n",
"cl_name = widg.Label(value = 'Nominal CL (cm)',layout=widg.Layout(width='95%', grid_area='cl_name'),)\n",
"cl = widg.ToggleButtons(options=pty.load_cameralengths(aperture, \"nominal\"), value=8, description='', layout=widg.Layout(width='95%', grid_area='cl_set1'), **ali3)\n",
- "camera_name = widg.Label(value = 'Detector',layout=widg.Layout(width='95%', grid_area='camera_name'),)\n",
- "camera = widg.ToggleButtons(options=pty.load_detectors(), description='', layout=widg.Layout(width='95%', grid_area='camera_set1'), style = {'description_width': '60px','button_width': str(100/len(pty.load_detectors())-len(pty.load_detectors()))+'%', 'font_weight': 'bold'}, button_style='')\n",
+ "\n",
+ "camera_name = widg.Label(value = 'Detector', layout=widg.Layout(width='94%', grid_area='camera_name'),)\n",
+ "camera = widg.Dropdown(options=pty.load_detectors(), description='', layout=widg.Layout(width='93%', grid_area='camera_set1'))\n",
"restr_name = widg.Label(value = 'PAAR',layout=widg.Layout(width='350px', grid_area='restr_name'))\n",
"restr = widg.ToggleButtons(options=[('.',False), ('',True)], value = False, description='',icons = ['ban','check'], layout=widg.Layout(width='95%', grid_area='camera_set2'),style = {'description_width': '80px','button_width': '48%', 'font_weight': 'bold'}, button_style='')\n",
"binning_name = widg.Label(value = 'Binning',layout=widg.Layout(width='95%', grid_area='binning_name'))\n",
- "binning = widg.ToggleButtons(options=[('',1), ('2',2), ('4',4), ('8',8), ('16',16)], value=1, description='', icons = ['ban','','','',''], layout=widg.Layout(width='95%', grid_area='camera_set3'), **ali3)\n",
+ "binning = widg.ToggleButtons(options=[('',1), ('2',2), ('4',4), ('8',8)], value=1, description='', icons = ['ban','','','',''], layout=widg.Layout(width='95%', grid_area='camera_set3'), **ali3)\n",
"camera_set6 = widg.Button(description='Post-acquisition treatments (ITR)',layout=widg.Layout(width='95%', grid_area='camera_set6'),style=widg.ButtonStyle(button_color='white', font_size= '16px',text_color='black'),disabled = False)\n",
"padding = widg.SelectionSlider(options=[('none',1), ('double',2), ('triple',3), ('quadruple',4), ('quintuple',5)], value=1, description='Padding', continuous_update=False, orientation='horizontal', readout=True, layout=widg.Layout(width='95%', grid_area='camera_set4'), **ali)\n",
"pattern_resto = widg.SelectionSlider(options=[('none',1), ('double',2), ('triple',3), ('quadruple',4), ('quintuple',5)], value=1, description='Pattern recovery', continuous_update=False, orientation='horizontal', readout=True, layout=widg.Layout(width='95%', grid_area='camera_set5'), **ali)\n",
@@ -159,30 +169,29 @@
"aperture.observe(show_corrprobe_angle, names='value') \n",
"\n",
"### Visualisation\n",
- "visual_set = widg.Button(description='Visualisation',layout=widg.Layout(width=perc95, grid_area='visual_set'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',font_size= '16px',text_color='black'),disabled = False)\n",
+ "visual_set = widg.Button(description='Visualisation',layout=widg.Layout(width='95%', grid_area='visual_set'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',font_size= '16px',text_color='black'),disabled = False)\n",
"name1 = widg.Button(description='Scale (%)',layout=widg.Layout(width='95%', grid_area='name1'),style=widg.ButtonStyle(button_color='white', font_weight= 'bold',text_color='black'), disabled = False)\n",
"graph_size = widg.IntSlider(value=100,min=75,max=125,step=5, description='', layout=widg.Layout(width='95%', grid_area='gr_size2'), button_style='primary',disabled=False,)\n",
"\n",
"### Layout\n",
- "controls = widg.GridBox(children=[logo, method, beam_energy, beam_set, aperture, probe_size, defocus, scanning_set, mag, matrix, dwell_time, cl, camera_set, camera, camera_name, restr_name, restr, binning_name,\n",
- " binning, aperture_res, aperture_res2, graph_size, name1, visual_set, padding, pattern_resto, camera_set6, probe_size_ma, aperture_ma, step_ma,cl_name],\n",
- " layout=widg.Layout(width='355px', grid_template_rows='90px 40px 35px 35px 35px 35px 35px 30px 30px 35px 35px 35px 35px 62px 35px 35px 35px 35px 35px 95px 35px 35px 35px', grid_template_columns='20% 10% 30% 15% 25%', grid_template_areas='''\n",
+ "controls = widg.GridBox(children=[logo, method, beam_energy, beam_set, aperture, probe_size, defocus, scanning_set, mag, matrix, dwell_time, cl, camera_set, camera, restr_name, restr, binning_name,\n",
+ " binning, aperture_res, aperture_res2, graph_size, name1, visual_set, padding, pattern_resto, camera_set6, probe_size_ma, aperture_ma, step_ma,cl_name, camera_name],\n",
+ " layout=widg.Layout(width='325px', grid_template_rows='90px 40px 35px 35px 35px 35px 35px 30px 30px 35px 35px 35px 35px 35px 62px 35px 35px 35px 35px 95px 35px 35px 35px', grid_template_columns='22% 8% 30% 20% 25%', grid_template_areas='''\n",
" \"logo logo logo logo logo \" \n",
" \"methods methods methods methods methods \"\n",
" \"beam_set beam_set beam_set beam_set beam_set \" \n",
" \"beam_set1 beam_set1 beam_set1 beam_set1 beam_set1 \"\n",
- " \"beam_set4 beam_set4 beam_set4 beam_set4 beam_set4 \"\n",
+ " \"beam_set4 beam_set4 beam_set4 beam_set4 beam_set4 \"\n",
" \"beam_set3 beam_set3 beam_set3 beam_set3 beam_set5 \"\n",
" \"beam_set2 beam_set2 beam_set2 beam_set2 beam_set6 \"\n",
" \". sidebar2 sidebar2 sidebar2 sidebar5 \"\n",
- "\n",
" \"scanning_set scanning_set scanning_set scanning_set scanning_set \" \n",
" \"scanning_set1 scanning_set1 scanning_set1 scanning_set1 beam_set7\"\n",
" \"scanning_set2 scanning_set2 scanning_set2 scanning_set2 scanning_set2\"\n",
" \"scanning_set3 scanning_set3 scanning_set3 scanning_set3 scanning_set3\"\n",
" \"camera_set camera_set camera_set camera_set camera_set \"\n",
- " \"cl_name cl_set1 cl_set1 cl_set1 cl_set1 \"\n",
" \"camera_name camera_set1 camera_set1 camera_set1 camera_set1 \"\n",
+ " \"cl_name cl_set1 cl_set1 cl_set1 cl_set1 \"\n",
" \"restr_name camera_set2 camera_set2 camera_set2 camera_set2 \"\n",
" \"binning_name camera_set3 camera_set3 camera_set3 camera_set3 \"\n",
" \"camera_set6 camera_set6 camera_set6 camera_set6 camera_set6\"\n",
@@ -406,12 +415,12 @@
" fig1.add_annotation(x=-2*step_size_corr, y=-1*step_size_corr, ax=-2*step_size_corr, ay=-2*step_size_corr, xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='red')\n",
" fig1.add_annotation(x=2*step_size_corr-0.75*beam_diameter/2, y=-2*step_size_corr-0.75*beam_diameter/2, ax=2*step_size_corr, ay=-2*step_size_corr,xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='blue')\n",
" fig1.add_annotation(x=2*step_size_corr+0.75*beam_diameter/2, y=-2*step_size_corr+0.75*beam_diameter/2, ax=2*step_size_corr, ay=-2*step_size_corr,xref='x',yref='y',axref='x',ayref='y',text='', showarrow=True,arrowhead=2,arrowsize=2,arrowwidth=1,arrowcolor='blue')\n",
- " fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='red', name='ΔR '+str(np.round(10*step_size_corr,2))+' Å')) \n",
+ " fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='red', name='ΔR '+str(np.round(10*step_size_corr,3))+' Å')) \n",
" fig1.add_trace(go.Scatter(showlegend=True, x=[-100], y=[-100],marker_size=12, marker_color='blue', name='Probe ⌀ '+str(np.round(10*beam_diameter,2))+' Å')) \n",
"\n",
" match method: \n",
" case 'ssb':\n",
- " fig1.add_trace(go.Scatter(showlegend=True, x=(0,0), y=(0,0),marker_size=12, marker_color='green', name= 'ΔR_SSB ' + str(np.round(dRssb,2))+' Å', opacity = 0)) \n",
+ " fig1.add_trace(go.Scatter(showlegend=True, x=(0,0), y=(0,0),marker_size=12, marker_color='green', name= 'ΔR_SSB ' + str(np.round(dRssb,3))+' Å', opacity = 0)) \n",
" fig1.update_layout(width=3.15*graph_size, height=3.9*graph_size, plot_bgcolor='white', margin = dict(l=0.65*graph_size, r=0.01*graph_size, t=0.8*graph_size, b=0.7*graph_size),\n",
" legend = dict(orientation=\"v\",yanchor=\"bottom\",y=1.01, xanchor=\"right\",x=1), title = {'text': \"Sample\",'y': 0.87, 'x': 0.23,'xanchor': 'left','yanchor': 'top'})\n",
" case 'iterative':\n",
@@ -776,7 +785,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.5"
+ "version": "3.10.13"
},
"varInspector": {
"cols": {
diff --git a/ptychoscopy/__pycache__/pty.cpython-310.pyc b/ptychoscopy/__pycache__/pty.cpython-310.pyc
index ac01189..4eded9a 100644
Binary files a/ptychoscopy/__pycache__/pty.cpython-310.pyc and b/ptychoscopy/__pycache__/pty.cpython-310.pyc differ
diff --git a/ptychoscopy/calibrations - Copy.xlsx b/ptychoscopy/calibrations - Copy.xlsx
index 045e79a..3c41b06 100644
Binary files a/ptychoscopy/calibrations - Copy.xlsx and b/ptychoscopy/calibrations - Copy.xlsx differ
diff --git a/ptychoscopy/calibrations.xlsx b/ptychoscopy/calibrations.xlsx
index da5d503..e9a20e3 100644
Binary files a/ptychoscopy/calibrations.xlsx and b/ptychoscopy/calibrations.xlsx differ
diff --git a/ptychoscopy/logo.PNG b/ptychoscopy/logo.PNG
index f39fc04..cb4a1b3 100644
Binary files a/ptychoscopy/logo.PNG and b/ptychoscopy/logo.PNG differ