Release notes
0.1.0
Added:
Add
ConstantWavelengthInstrument, the instrument of a constant-wavelength x-ray, neutron or electron diffractometer, with refinablezero,displacement,transparency,mu_randwavelength, and settings for the radiation type, an x-ray source’s Kalpha1/Kalpha2 doublet and the polarization rate.Warn when a
ConstantWavelengthInstrumentsetter replaces a refined wavelength or a Kalpha1/Kalpha2 doublet, or when a polarization rate has no effect because the radiation isn’t x-rays.Add
Component.create_parameters_from, which creates a component’s Parameters from a pyobjcryst model, with the model’s default values and its limits as bounds, andComponent.push_parameters, which writes the values back and raises aValueErrorfor a value outside the limits instead of letting ObjCryst clamp it silently.Add the skeleton of the package:
PowderDiffractionGenerator, theComponentbase class, the peak profile, instrument, intensity correction and intensity source components,ChebyshevBackground, and the parsers of data and instrument parameter files. The classes are stubs that raiseNotImplementedErroruntil they are filled in.Add
Component.settings_versionandComponent.mark_settings_changed, so a generator can runinstallagain after a setting of a component changes.Add a
targetargument toComponent.create_parameters_fromandComponent.push_parameters, so one component can configure several pyobjcryst objects, such as a pattern and its radiation.Add the
PseudoVoigtProfileandTCHProfilepeak profile components, which create their Parameters from pyobjcryst’sReflectionProfilePseudoVoigtandReflectionProfilePseudoVoigtTCHand configure a pyobjcryst powder pattern withinstallandupdate.GSASDataParserreads GSAS STD and ESD powder data files, with counting-statistics uncertainties for STD files.Add
PowderDiffractionGenerator, which calculates one phase’s Bragg intensity with pyobjcryst from a structure set withset_structure(a pyobjcrystCrystal, the path to a CIF file or a ParameterSet), a peak profile set withset_peak_profileand an instrument set withset_instrument, and a refinablescale. It has no default peak profile or instrument, so all three must be set before a pattern is calculated.Add
PowderDiffractionGenerator.print_info, which prints the generator’s structure, instrument and peak profile with their settings and Parameter values.Add
Component.get_settings, which returns a component’s settings for showing to a user, and itsConstantWavelengthInstrumentversion, which lists the radiation type, the x-ray source or Kalpha1/Kalpha2 wavelengths, and the polarization rate.Warn when
set_structure,set_peak_profileorset_instrumentreplaces a structure or component whose Parameters are used in a fit recipe.