hkl

This section shows how a widget that displays the components of the hkl vector and the diffractometer angles are displayed (14.7).

#
#
#
$Spc::res_h{ blsc} = "hkl";
$Spc::res_h{ hkl_title} = { text => "hkl"};
$Spc::res_h{ hkl_io1} = { label => { name => "h",
				     unit => "    ", 
				     get => sub{ Spectra::h();}},
			  entry => { set => sub{ Spectra::hkl( h => $_[0]);}}}; 
$Spc::res_h{ hkl_io2} = { label => { name => "k",
				     unit => "    ", 
				     get => sub{ Spectra::k();}},
			  entry => { set => sub{ Spectra::hkl( k => $_[0]);}}};
$Spc::res_h{ hkl_io3} = { label => { name => "l",
				     unit => "    ", 
				     get => sub{ Spectra::l();}},
			  entry => { set => sub{ Spectra::hkl( l => $_[0]);}}};
$Spc::res_h{ hkl_io4} = { label => { name => "Psi",
				     unit => "Deg.", 
				     get => sub{ Spectra::psi();}},
			  entry => { set => sub{ Spectra::hkl( psi => $_[0]);}}};
$Spc::res_h{ hkl_io5} = { label => { name => "TwoTheta",
				     unit => "Deg.", 
				     get => sub{ Spectra::two_theta();}},
			  entry => { set => sub{ Spectra::angles( two_theta => $_[0]);}}};
$Spc::res_h{ hkl_io6} = { label => { name => "Omega",
				     unit => "Deg.", 
				     get => sub{ Spectra::omega();}},
			  entry => { set => sub{ Spectra::angles( omega => $_[0]);}}};
$Spc::res_h{ hkl_io7} = { label => { name => "Chi",
				     unit => "Deg.", 
				     get => sub{ Spectra::chi();}},
			  entry => { set => sub{ Spectra::angles( chi => $_[0]);}}};
$Spc::res_h{ hkl_io8} = { label => { name => "Phi",
				     unit => "Deg.", 
				     get => sub{ Spectra::phi();}},
			  entry => { set => sub{ Spectra::angles( phi => $_[0]);}}};

Figure 14.7: The hkl Widget
Image blsc_hkl