= '../../results/realdata_fega10_v10_demo/analyze_sample__fega10_v10__merged.h5' fname
How to work with real data
Computing files
Before running the below commands make sure you have correctly installed and setup your environment.
Download the dataset to tmp
directory (create it first). From the base folder run
0 --conf tmp/config_realdata_fega10_v10_demo.yaml -o results/realdata_fega10_v10_demo/ --n-grid 1000
laueotx realdata singlegrain 1 --conf tmp/config_realdata_fega10_v10_demo.yaml -o results/realdata_fega10_v10_demo/ --n-grid 1000
laueotx realdata singlegrain 0 1 --conf tmp/config_realdata_fega10_v10_demo.yaml -o results/realdata_fega10_v10_demo/ --n-grid 1000 laueotx realdata multigrain
We will be analysing the merged output of the previous commands
= plotting.load_sample(fname) spot_loss, s_obs, s_mod, inds_mod, inds_obs, p_lam, s2g_mod_assign, s2g_obs_assign, s2s_mod_assign, s2s_obs_assign
Code
= plotting.load_grain_params(fname)
a_est, x_est plotting.plotly_scatter3d_sample(a_est, x_est)
Code
= range(0,360,4) omegas
Plot grain statistics
Code
1], s2g_obs_assign, tag='detected ')
plotting.print_nspots_per_det(inds_obs[1], s2g_mod_assign, tag='model ') plotting.print_nspots_per_det(inds_mod[
spots=detected total n_spots=269181 assigned 15698 [5.83%]
spots=detected detector=0 n_spots=197047 assigned 12959 [6.58%]
spots=detected detector=1 n_spots= 72134 assigned 2739 [3.80%]
spots=model total n_spots= 18889 assigned 15698 [83.11%]
spots=model detector=0 n_spots= 15363 assigned 12959 [84.35%]
spots=model detector=1 n_spots= 3526 assigned 2739 [77.68%]
Code
plotting.plotly_grain_stats(s2s_mod_assign, s2s_obs_assign, s2g_mod_assign, s2g_obs_assign, s_obs, s_mod, inds_mod, inds_obs)
n_grains=17
Plot prototype loss
Code
=None, xscale='linear', yscale='linear') plotting.plotly_spot_loss(fname, n_max
Plot spots for a given rotation angle
Code
=s_obs, inds_obs=inds_obs, s_mod=s_mod, inds_mod=inds_mod, spot_mod_assign=s2g_mod_assign, p_lam=p_lam, omegas=omegas,
plotting.plotly_scatter_spots_assignment_per_angle(s_obs=1,
ind_angle='darkgrey',
color_obs=0.5,
lw='tab10') cmap
Plot spots for a given grain
Code
=s_obs, inds_obs=inds_obs, s_mod=s_mod, inds_mod=inds_mod, spot_mod_assign=s2g_mod_assign, spot_obs_assign=s2g_obs_assign, p_lam=p_lam, omegas=omegas,
plotting.plotly_scatter_spots_assignment_per_grain(s_obs=1,
ind_grain='darkgrey',
color_obs=0.5,
lw='tab10') cmap