package Diffraction @ISA = qw() sub ElectroneVTonm my ($ElectronEnergy, $Relativistic) = @_; return $h / sqrt($l0 * $K) * 1.0e9; return $h / sqrt($l0) * 1.0e9; return sqrt($h * $h / 2.0 / $me / $ElectronEnergy / $e) * 1.0e9; sub TransmissionMode return shift->{TransmissionMode}; sub Wavelength return shift->{Wavelength}; sub SetWavelength sub SetWavelength { my ($this,$wl)= return $this->{Wavelength}=$wl; sub SourceSpectrum return shift->{pSourceSpectrum}; sub SetSourceSpectrum sub SetSourceSpectrum { my ($this,$p)= return $this->{pSourceSpectrum}=$p; sub DiffractionMode return shift->{DiffractionMode}; sub SetDiffractionMode my ($this, $mode) = @_; return $this->{DiffractionMode} = $mode; sub Source return shift->{Source}; sub SetSource sub SetSource { my ($this,$s)= return $this->{Source} = $s; sub Crystal return shift->{pCrystal}; sub SetCrystal my ($this, $pCrystal, $Source) = @_; return $this->{pCrystal}; sub SetOrienation my ($this, $h, $k, $l, $shape, $p1, $p2) = @_; sub hklRange sub hklRange { my ($this)= return ($this->{hmax}, $this->{kmax}, $this->{lmax}); sub SethklRange my $this = shift; return ($this->{hmax}, $this->{kmax}, $this->{lmax}) = return ($this->{hmax}, $this->{kmax}, $this->{lmax}) = @_; sub Q2Range sub Q2Range { my ($this)= return ($this->{Q2Start}, $this->{Q2Stop}, $this->{Q2Step}, $this->{nQ2}); sub SetQ2Range my ($this, $Q2Start, $Q2Stop, $Q2Step) = @_; return ($Q2Start, $Q2Stop, $Q2Step, $this->{nQ2}); sub Incidenthkl sub Incidenthkl { my ($this)= return ($this->{Incidenth}, $this->{Incidentk}, $this->{Incidentl}); sub SetIncidenthkl my $this = shift; return ($this->{Incidenth}, $this->{Incidentk}, $this->{Incidentl}) = return ($this->{Incidenth}, $this->{Incidentk}, $this->{Incidentl}) = @_; sub Perpendicularhkl sub Perpendicularhkl { my ($this)= return ($this->{Perpendicularh}, $this->{Perpendiculark}, $this->{Perpendicularl}); sub SetPerpendicularhkl my $this = shift; return ($this->{Perpendicularh}, $this->{Perpendiculark}, $this->{Perpendicularl}) = return ($this->{Perpendicularh}, $this->{Perpendiculark}, $this->{Perpendicularl}) = @_; sub Horizontalhkl sub Horizontalhkl { my ($this)= return ($this->{Horizontalh}, $this->{Horizontalk}, $this->{Horizontall}); sub SetHorizontalhkl my $this = shift; return ($this->{Horizontalh}, $this->{Horizontalk}, $this->{Horizontall}) = return ($this->{Horizontalh}, $this->{Horizontalk}, $this->{Horizontall}) = @_; sub ScreenGeometry sub ScreenGeometry { my ($this)= return ($this->{ScreenW}, $this->{ScreenH}, $this->{ScreenDistance}); sub SetScreenGeometry my ($this, $w, $h, $distance) = @_; sub PeakWidth return shift->{PeakWidth}; sub SetPeakWidth sub SetPeakWidth { my ($this,$w)= return $this->{PeakWidth} = $w; sub ThermalVibrationFactor sub ThermalVibrationFactor { my ($this)= return $this->{Biso}; sub SetThermalVibrationFactor my ($this, $Biso) = @_; return $this->{Biso} = $Biso; sub IncidentAngle return shift->{IncidentAngle}; sub SetIncidentAngle sub SetIncidentAngle { my ($this, $Q) = return $this->{IncidentAngle} = $Q; sub Q2Min return shift->{Q2Min}; sub SetQ2Min sub SetQ2Min { my ($this, $Q2Min) = return $this->{Q2Min} = $Q2Min; sub Q2Max return shift->{Q2Max}; sub SetQ2Max sub SetQ2Max { my ($this, $Q2Max) = return $this->{Q2Max} = $Q2Max; sub pXRDQ2 return shift->{pXRDQ2}; sub SetpXRDQ2 sub SetpXRDQ2 { my ($this,$p)= return $this->{pXRDQ2} = $p; sub pXRDIntensity return shift->{pXRDIntensity}; sub SetpXRDIntensity sub SetpXRDIntensity { my ($this,$p)= return $this->{pXRDIntensity} = $p; sub pQ2 return shift->{pQ2}; sub SetpQ2 sub SetpQ2 { my ($this,$p)= return $this->{pQ2} = $p; sub ppFArray return shift->{ppF}; sub SetppFArray sub SetppFArray { my ($this,$p)= return $this->{ppF} = $p; sub pIntensityArray return shift->{pIntensity}; sub SetpIntensityArray sub SetpIntensityArray { my ($this,$p)= return $this->{pIntensity} = $p; sub prIntensityArray return shift->{prI}; sub SetprIntensityArray sub SetprIntensityArray { my ($this,$p)= return $this->{prI} = $p; sub pScreenXArray return shift->{pScreenXArray}; sub SetpScreenXArray sub SetpScreenXArray { my ($this,$p)= return $this->{pScreenXArray} = $p; sub pScreenYArray return shift->{pScreenYArray}; sub SetpScreenYArray sub SetpScreenYArray { my ($this,$p)= return $this->{pScreenYArray} = $p; sub pTagArray return shift->{pTag}; sub SetpTagArray sub SetpTagArray { my ($this,$p)= return $this->{pTag} = $p; sub phklArray return shift->{pphkl}; sub pWLArray return shift->{pWL}; sub pQ2Array return shift->{pQ2}; sub pISourceArray return shift->{pISource}; sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub Prepare my ($this, $DiffractionMode) = @_; sub ResetFhkl my ($this, $f) = @_; return if(!$f); sub pData return shift->{pData}; sub SetpData my ($this, $pData) = @_; sub CalLauePattern my ($this, $callback) = @_; sub CalTEDPattern my ($this, $callback) = @_; sub CalRHEEDPattern my ($this, $callback) = @_; sub CalLEEDPattern my ($this, $callback) = @_; sub CalPowderXRDPattern my ($this, $callback) = @_; return $this->CalPowderXRDFhkl($callback); sub CalPowderXRDFhkl my ($this, $callback) = @_; sub CalGmin my ($this, $pCrystal, $pVars, $iPrintLevel) = @_; return 1.0 / $dhkl; sub Guesshklmax my ($this) = @_; sub { $this->CalGmin($pCrystal, sub { $this->CalGmin($pCrystal, sub { $this->CalGmin($pCrystal, return ($hmax, $kmax, $lmax);