Skip to content

Releases: diffpy/diffpy.srfit

3.3.1

Choose a tag to compare

@github-actions github-actions released this 15 Aug 04:22

Added:

  • Add regex parsing ability in PDFParser for file headers that do not have the structure output by xPDFsuite and PDFgetX.

3.3.1-rc.0

3.3.1-rc.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 14 Aug 21:27
e52f047

What's Changed

  • refactor and feat: Add parsing ability for NOMAD datafiles and breakout tests in test_pdf.py into respective files by @cadenmyers13 in #207
  • update installation instructions by @sbillinge in #209

Full Changelog: 3.3.0...3.3.1-rc.0

3.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Aug 23:05

Added:

  • Added add_parameter_set method to replace deprecated FitRecipe.addParameterSet.
  • Added add_parameter_set method to replace deprecated ParameterSet.addParameterSet.
  • Added diffpy.structure back to the requirements and run the test
  • Added add_constraint method to RecipeOrganizer.
  • Added remove_constraint method to RecipeOrganizer.
  • Added add_soft_bounds method to RecipeOrganizer.
  • Added remove_soft_bounds method to RecipeOrganizer.
  • Added register_soft_bounds method to RecipeOrganizer.
  • Added clear_all_soft_bounds method to RecipeOrganizer.
  • Added get_equation_from_string method to RecipeOrganizer.
  • Add parse_file method to ProfileParser to parse a file directly with load_data from diffpy.utils.
  • Add _parse_metadata and _parse_data hooks to ProfileParser, which subclasses override to support a new data format. parse_file is a template method that calls them.
  • Add get_num_banks method to ProfileParser to replace getNumBanks.
  • Add select_bank method to ProfileParser to replace selectBank.
  • Add get_format method to ProfileParser to replace getFormat.
  • Add get_data method to ProfileParser to replace getData.
  • Add get_metadata method to ProfileParser to replace getMetaData.
  • Added get_equation method to BaseBuilder.
  • Added get_equation method to FitContribution.
  • Add plot_recipe method to FitRecipe.
  • Added initialize_recipe_with_results to FitRecipe.
  • Added iterate_over_parameters method.
  • Added register_calculator method.
  • Added register_function method.
  • Added register_string_function method.
  • Added evaluate_equation method.
  • Added is_constrained method.
  • Added get_constrained_parameters method.
  • Added clear_all_constraints method.
  • Added add_profile_generator to replace deprecated function.
  • Added is_constant method to Parameter.
  • Added bound_range method to Parameter.
  • Added bound_window method to Parameter.
  • Added set_weight method to FitRecipe to replace setWeight.
  • Added get_fit_hooks method to FitRecipe to replace getFitHooks.
  • Added clear_fit_hooks method to FitRecipe to replace clearFitHooks.
  • Added pop_fit_hook method to FitRecipe to replace popFitHook.
  • Added push_fit_hook method to FitRecipe to replace pushFitHook.
  • Add spherical_particle, spheroidal_particle, lognormal_spherical_particle, sheet_particle, and shell_particle to diffpy.srfit.pdf.characteristicfunctions, replacing sphericalCF, spheroidalCF, lognormalSphericalCF, sheetCF, and shellCF.
  • Add constrain_as_space_group to diffpy.srfit.structure.sgconstraints, replacing constrainAsSpaceGroup.
  • Added get_residual_equation method to FitContribution.
  • Added set_residual_equation method to FitContribution.
  • Added set_value method to diffpy.srfit.fitbase.Parameter.
  • Added save_results method to FitResults.
  • Added print_results method to FitResults.
  • Added get_results_string method to FitResults.
  • Added create_new_variable method to FitRecipe.
  • Added delete_variable method to FitRecipe.
  • Added add_variable method to FitRecipe.
  • Added scalar_residual method to FitRecipe.
  • Added remove_parameter_set method to FitRecipe.
  • Added test for remove_parameter_set method in FitRecipe.
  • Added initialize_recipe_from_recipe to FitRecipe.
  • Added convert_bounds_to_restraints method to FitRecipe.
  • Added get_bounds_pairs method to FitRecipe.
  • Added get_bounds_array method to FitRecipe.
  • Added get_names method to FitRecipe and RecipeContainer.
  • Added get_values method to FitRecipe and RecipeContainer.
  • Added is_free method to FitRecipe.
  • Added set_equation method to replace setEquation.
  • Added FitResults.get_results_dictionary in replace of resultsDictionary.
  • Added add_contribution in replace of addContribution.
  • Support for Python 3.14
  • Added load_parsed_data in replace of loadParsedData in Profile and SimpleRecipe.
  • Added set_observed_profile in replace of setObservedProfile in Profile and SimpleRecipe.
  • Added set_calculation_range in replace of setCalculationRange in Profile and SimpleRecipe.
  • Added set_calculation_points in replace of setCalculationPoints in Profile and SimpleRecipe.

Changed:

  • Change PDFParser to inherit _parse_metadata and _parse_data unchanged from ProfileParser, since PDFgetX and PDFgetN headers are now plain name = value pairs. PDFParser.parse_file returns the same data and metadata that PDFParser.parseFile did.
  • Change ProfileParser.parse_file to accept the keyword arguments of load_data, such as usecols, delimiter and comments. Use usecols to select columns from a file with more than four of them.
  • Change PDFContribution.loadData to take a file name only.
  • Change the headers of the si-q27r60-xray.gr and ni-q27r100-neutron.gr test files to the modern diffpy.pdfgetx and xPDFsuite configuration formats, replacing the 2008-era PDFgetX2/PDFgetN headers. The data values are unchanged.
  • Change spheroidalCF2 and shellCF2 in diffpy.srfit.pdf.characteristicfunctions to be deprecated aliases that convert their arguments and call spheroidal_particle and shell_particle, instead of separate implementations.
  • Change the current characteristic functions in diffpy.srfit.pdf.characteristicfunctions (spherical_particle, spheroidal_particle, lognormal_spherical_particle, sheet_particle and shell_particle) to emit a RuntimeWarning when a non-physical shape parameter makes them return zero, since a zero return flattens the fit residual and stalls a refinement without any other sign to the user. The warning is issued once per process for each distinct problem so a refinement loop does not repeat it. The deprecated camel-case functions forward to these functions directly, so they emit the same warning and return the same result for non-physical input.
  • Change lognormal_spherical_particle in diffpy.srfit.pdf.characteristicfunctions to return zero for a negative particle_diameter_sigma instead of silently returning spherical_particle. A particle_diameter_sigma of zero is still the sphere limit.
  • Change sheet_particle in diffpy.srfit.pdf.characteristicfunctions to return an array of zeros for a non-positive sheet_thickness when r is an array, instead of a scalar zero.
  • Change ProfileParser.parse_file to set unavailable dx/dy uncertainties to None instead of 0, matching the format-specific parsers.
  • Change Profile.set_observed_profile to leave dyobs as None when no uncertainties are observed, instead of silently replacing them with an array of ones. The calculated dy still defaults to 1 at every calculation point, so unweighted fits refine exactly as before.
  • Change Profile._validate to accept a None dyobs, since observed uncertainties are optional. x, y, dy, xobs and yobs are still required.
  • Changed iterPars method to match all equal-type atoms to have same ADPs

Deprecated:

  • Deprecated addParameterSet method in FitRecipe.
  • Deprecate addParameterSet method in ParameterSet.
  • Deprecated constrain method of RecipeOrganizer. Use add_constraint instead.
  • Deprecated unconstrain method of RecipeOrganizer. Use remove_constraint instead.
  • Deprecated restrain method of RecipeOrganizer. Use add_soft_bounds instead.
  • Deprecated unrestrain methods of RecipeOrganizer. Use remove_soft_bounds instead.
  • Deprecated addRestraint method of RecipeOrganizer. Use register_soft_bounds instead.
  • Deprecate clearRestraints method of RecipeOrganizer. Use clear_all_soft_bounds instead.
  • Deprecated equationFromString method of RecipeOrganizer. Use get_equation_from_string instead.
  • Deprecate getNumBanks, selectBank, getFormat, getData, and getMetaData in ProfileParser.
  • Deprecate ProfileParser.parseFile, which now delegates to parse_file. Use parse_file instead.
  • Deprecated BaseBuilder.getEquation method for removal in 4.0.0.
  • Deprecated FitContributution.getEquation method for removal in 4.0.0.
  • Deprecated iterPars method. Use iterate_over_parameters instead.
  • Deprecated registerCalculator method. Use register_calculator instead.
  • Deprecated registerFunction method. Use register_function instead.
  • Deprecated registerStringFunction method. Use register_string_function instead.
  • Deprecated evaluateEquation method. Use evaluate_equation instead.
  • Deprecated isConstrained method. Use is_constrained instead.
  • Deprecated getConstrainedPars method. Use get_constrained_parameters instead.
  • Deprecated clearConstraints method. Use clear_all_constraints instead.
  • Deprecate setProfile for removal in version 4.0.0.
  • Deprecated addProfileGenerator for removal in 4.0.0.
  • Deprecated isConst method of Parameter. Use is_constant instead.
  • Deprecated boundRange method of Parameter. Use bound_range instead.
  • Deprecated boundWindow method of Parameter. Use bound_window instead.
  • Deprecated setWeight in FitRecipe for removal in 4.0.0.
  • Deprecated getFitHooks in FitRecipe for removal in 4.0.0.
  • Deprecated clearFitHooks in FitRecipe for removal in 4.0.0.
  • Deprecated popFitHook in ``FitRe...
Read more

3.3.0-rc.3

3.3.0-rc.3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 08 Aug 22:47
d1e8f64

What's Changed

Full Changelog: 3.3.0-rc.2...3.3.0-rc.3

3.3.0-rc.2

3.3.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 08 Aug 22:28
50ab7c4

What's Changed

Full Changelog: 3.2.0...3.3.0-rc.2

3.2.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 13:55

Changed:

  • Temporarily removed support for SAS characteristic functions until we can migrate to the new sasview api.
  • doc/ -> docs/
  • requirements/test.txt -> requirements/tests.txt

Fixed:

  • Better license designation in pyproject.toml

3.2.0-rc.2

3.2.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 11 Aug 15:25
09a8e1c

What's Changed

  • chore: fix docstrings to generate API page. by @ycexiao in #132

Full Changelog: 3.2.0-rc.1...3.2.0-rc.2

3.2.0-rc.1

3.2.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 10 Aug 04:32
e368e57

What's Changed

  • chore: fix examples by @ycexiao in #131
  • chore: sync conf.py extensions with docs dependencies listed in requirements folder by @zmx27 in #130

Full Changelog: 3.2.0-rc.0...3.2.0-rc.1

3.2.0-rc.0

3.2.0-rc.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Aug 12:01
de32312

What's Changed

  • fix: license designation in pyproject.toml by @sbillinge in #122
  • style: rename CODE_OF_CONDUCT to CODE-OF-CONDUCT by @sbillinge in #123
  • style: use numpy docstring and fix documentation rendering by @ycexiao in #125
  • test: use filename string instead of pathlib.Path to fix tests using diffpy.structure by @ycexiao in #128
  • refactor: update sasview api for test_sas.py by @zmx27 in #126

New Contributors

Full Changelog: 3.1.0...3.2.0-rc.0

3.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 19:12

Version 3.0.0 – 2019-03-14

Added:

  • Support for Python 3.7, 3.6, 3.5 in addition to 2.7.

Changed:

  • Always use lower-case imports from diffpy.structure.
  • Use numeric-value sort to order variables in PrintFitHook.

Deprecated:

  • Variable __gitsha__ in the version module renamed to __git_commit__.

Removed:

  • Optional upper and lower-bound arguments in Parameter.setValue.
    The bounds can be set with Parameter.boundRange instead.
  • Unused classes ListOperator, SetOperator.

Fixed:

  • Metadata retrieval from PDFContribution hierarchy.
  • Refresh PDFGenerator when its rgrid is changed in-place.
  • Zero division in the nppdfsas.py example.
  • Crash in ellipsoidsas.py example because of bug in Parameter.setValue.
  • Pickling of ProfileGenerator objects and of bound class methods.
  • Invalid escape sequences in string values.