Skip to main content

    Interpreting PyWPEM outputs

    Read rp, rwp, convergence_flag and per-phase mass and volume fractions from a refine_xrd result, and why goodness of fit is always null for this tool.

    pywpemoutputs

    Each operation returns structured JSON — simulated or fitted patterns, refined cell parameters, R-factors, phase fractions, or PDF curves. These let you judge how well a structure fits your data, quantify phases, and compare patterns against experimental measurements.

    Interpreting PyWPEM outputs

    Each operation returns a structured JSON result with operation-specific fields plus shared metadata.

    simulate_xrd output

    FieldTypeDescription
    peak_countintegerNumber of peaks in the simulated pattern
    two_theta_min / two_theta_maxnumberAngular range of the pattern
    formulastring | nullStructure formula, if extracted from the CIF
    space_groupstring | nullSpace group, if extracted from the CIF
    wavelength_usednumber[]Wavelength(s) actually used for the simulation
    grain_size_nmnumber | nullGrain size used for peak broadening, if set
    pattern_csv_urlstring | nullS3 URL to the simulated pattern CSV
    peaks_csv_urlstring | nullS3 URL to the peak list
    plot_urlstring | nullS3 URL to a pattern plot

    refine_xrd output

    FieldTypeDescription
    rpnumber | nullProfile R-factor (%), computed from the fit. null when it couldn't be computed — check metrics_available
    rwpnumber | nullWeighted profile R-factor (%), computed from the fit. null when it couldn't be computed — check metrics_available
    gofnullGoodness of fit / chi² is not computed — always null
    metrics_availablebooleanfalse when one or more of rp/rwp couldn't be computed for this fit
    metrics_unavailable_reasonstring | nullWhy a metric is missing, set when metrics_available is false
    iterations_completedintegerNumber of refinement iterations actually run, read from the solver
    convergence_flaginteger1 = converged, 2 = epsilon limit, 3 = max iterations, 4 = lock limit — read from the solver
    convergence_messagestringHuman-readable convergence status, read from the solver
    phasesarrayPer-phase results (one entry per item in the request's phases)
    phases[].namestringPhase identifier
    phases[].initial_lattice / phases[].refined_latticeobjectLattice constants before and after refinement
    phases[].mass_fraction / phases[].volume_fractionnumber | nullPhase fractions, for multi-phase refinements
    phases[].peak_countintegerPeaks attributed to this phase
    computation_timestringWall-clock time for the refinement
    fitted_profile_url / residual_plot_urlstring | nullS3 URLs to the fitted profile and residual plot
    peak_params_urlstring | nullS3 URL to fitted peak parameters

    A single refine_xrd call with two or more entries in phases returns multi-phase results — there's no separate multi-phase operation.

    R-factor interpretation

    R_wpQuality
    < 5%Excellent refinement
    5-10%Good refinement
    10-15%Acceptable (may need improvement)
    > 15%Poor fit (check model or data)

    This tool doesn't compute goodness-of-fit / chi² — gof is always null. Judge refinement quality from rwp and convergence_flag, and check residual_plot_url for systematic deviations.

    fit_background output

    FieldTypeDescription
    variancenumberEstimated background variance — feed this into refine_xrd's variance parameter
    background_points_countintegerNumber of background points used
    background_csv_url / no_background_csv_urlstring | nullBackground and background-subtracted CSVs
    plot_urlstring | nullDiagnostic plot
    mean_background / std_backgroundnumber | nullBackground statistics

    fit_amorphous output

    FieldTypeDescription
    num_componentsintegerNumber of Gaussian components fit
    componentsarrayPer-component position_2theta, sigma, amplitude, area
    total_amorphous_fractionnumber | nullEstimated amorphous fraction
    amorphous_csv_url / components_csv_url / plot_urlstring | nullResult artifacts

    fit_xps output

    FieldTypeDescription
    rp / rwpnumberFit R-factors
    iterations_completedintegerIterations run
    peaksarrayPer-peak atom, orbital, binding_energy, area, fwhm, lorentzian_fraction
    elemental_compositionobject | nullComposition derived from the fit
    fitted_profile_url / peak_params_url / plot_urlstring | nullResult artifacts

    fit_exafs output

    FieldTypeDescription
    coordination_shellsarrayPer-shell shell_number, r_angstrom, coordination_number, debye_waller
    first_shell_distancenumber | nullNearest-neighbor distance
    fft_plot_url / wavelet_plot_urlstring | nullTransform plots

    Downloading artifacts

    • CSV/JSON exports: Available from the job result panel
    • Plot images: Pattern plots are auto-generated for visual inspection
    • S3 artifacts: Linked in result metadata for programmatic access

    ⚠︎ Exact result field names may vary slightly by operation and are subject to change on the backend — treat this page as a guide and check a live job result for the authoritative shape.

    Was this page helpful?

    On this page

    On this page

    Loading...