Skip to content

Investigate/fix noisy low-r region of PDF in POLARIS reduction #38961

Closed
@RichardWaiteSTFC

Description

@RichardWaiteSTFC

Describe the bug

Comparison of PDF produced by Mantid (LEFT) and Gudrun (RIGHT)

Image

This could be due to the implementation of the fourier filter here

def fast_fourier_filter(ws, rho0, freq_params=None):

  • The output from this filter has regular bin-width (the input doesn’t) taken from smallest bin-width in data
  • If no rmax is supplied in the freq_params then it uses hard-coded rmax=200 – I’m not sure how reasonable this is?

It also affects PDF with merge_banks=False

Image

To Reproduce
(1) Ask me for files
(2) Update paths in .yaml files
(3) Run this script

from mantid.simpleapi import *
import numpy as np
from isis_powder import polaris, SampleDetails

config_file_path = r"C:\Users\xhg73778\Documents\POLARIS\PR34144Files\polaris_config_example.yaml"
polaris = polaris.Polaris(config_file=config_file_path, user_name="test")


sample_details = SampleDetails(height=4.0, radius=0.2985, center=[0, 0, 0], shape='cylinder')
sample_details.set_material(chemical_formula='Si', packing_fraction=0.6)
sample_details.set_container(radius=0.3175, chemical_formula='V')
polaris.set_sample_details(sample=sample_details)

# focus
polaris.create_vanadium(first_cycle_run_no="98532", multiple_scattering=True, mayers_mult_scat_events=1)
polaris.focus(run_number="98533", input_mode='Summed', # sample_empty="98532", # "98531"
              mode="PDF", do_absorb_corrections=True, do_van_normalisation=True,
              van_normalisation_method="Absolute",
              empty_can_subtraction_method= "PaalmanPings",
              sample_empty_scale=1.0)

# produce PDF
polaris.create_total_scattering_pdf(run_number="98533", 
                                    q_lims=[[-1, 0.5, 0.5, 0.5, 0.5],[-1, 30, 30, 30, 30]],
                                    delta_q=0.02,
                                    delta_r=0.02,
                                    pdf_type="g(r)",
                                    freq_params=[0.91],
                                    lorch_filter=True,
                                    placzek_order=2,
                                    sample_temp=300,
                                    pdf_output_name="pdf",
                                    merge_banks=True)

Expected behavior
Would produce result similar to gudrun

Screenshots

Platform/Version (please complete the following information):

  • OS: [e.g. Windows, RHEL 7, Ubuntu, macOS]
  • OS Version:
  • Mantid Version [e.g. 6.0.0]

Additional context

Metadata

Metadata

Labels

BugIssues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)DiffractionIssues and pull requests related to diffractionISIS: DiffractionIssue and pull requests relating to Diffraction at ISISPowderIssues and pull requests related to powder diffraction

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions