Skip to content

muD as a required input #165

Closed
1 of 1 issue completed
Closed

Description

@till-schertenleib

Problem

Proposed solution

there are two issues:

  1. why am I required to specify muD if I have a zscan file to determine muD experimentally?
  2. I specified a muD of 1.0, why does it tell me that this is outside o fhte acceptable range for muD (0.5 to 6.0)?

I guessed the muD of 1.0, since I don't know the muD of my sample. muD should only be a requirement if I don't provide a zscan file... no?

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. till-schertenleib commented on Feb 5, 2025

    @till-schertenleib
    CollaboratorAuthor

    Here is the input line and the error I got back.

    $ labpdfproc 1.0 ts1000_635um_3_accum_0.xy -w 0.71073 -x tth -z ts1000_635um_zscan_exported.xy
    Traceback (most recent call last):
    File "C:\Users\tills\miniconda3\envs\labpdfproc\Scripts\labpdfproc-script.py", line 9, in
    sys.exit(main())
    ^^^^^^
    File "C:\Users\tills\miniconda3\envs\labpdfproc\Lib\site-packages\diffpy\labpdfproc\labpdfprocapp.py", line 169, in main
    absorption_correction = compute_cve(input_pattern, args.mud, args.method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\tills\miniconda3\envs\labpdfproc\Lib\site-packages\diffpy\labpdfproc\functions.py", line 267, in compute_cve
    abdo_on_global_tth = cve_function(diffraction_data, mud)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\tills\miniconda3\envs\labpdfproc\Lib\site-packages\diffpy\labpdfproc\functions.py", line 213, in _cve_polynomial_interpolation
    raise ValueError(
    ValueError: mu*D is out of the acceptable range (0.5 to 6) for polynomial interpolation. Please rerun with a value within this range or specifying another method from ('brute_force', 'polynomial_interpolation').

  2. yucongalicechen commented on Feb 5, 2025

    @yucongalicechen
    Collaborator

    Yeah you're right. I'll implement this issue #143 to fix this. Right now if you have a zscan file, muD will be replaced by whatever it fits for the file. So it looks like the zscan muD here is <0.5 or > 6.

  3. sbillinge commented on Feb 6, 2025

    @sbillinge
    Contributor

    Thanks for reporting Till. For <0.5 I don't think we want to throw a value error, we can just extrapolate or set to 0.

    I guess this is teh second time someone wanted the fast interpolator to work for mud >6. We could offer this in principle. It just means calculating a few more curves, right? @till-schertenleib, how high do you want the MuD to go and still have the fast calculator work?

    Another thought, on the error message, it is probably a good idea to print what the value of hte muD is so the user has some idea why it failed.

  4. till-schertenleib commented on Feb 6, 2025

    @till-schertenleib
    CollaboratorAuthor
  5. yucongalicechen commented on Apr 18, 2025

    @yucongalicechen
    Collaborator

    Closed by #168 and #170.
    @till-schertenleib Could you try the new muD workflow when you get a chance? Thanks!
    The CLI works as follows: labpdfproc zro2_mo.xy --mud 2.5 or labpdfproc zro2_mo.xy -z zscanfilepath. You can also type labpdfproc --gui for the gui interface. Let me know how it works! I'll also update the instructions in the docs and readme soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions