scipp / essdiffraction

Diffraction data reduction for the European Spallation Source
https://scipp.github.io/essdiffraction/
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

[Requirement] Remove low resolution ToF #23

Open jl-wynen opened 7 months ago

jl-wynen commented 7 months ago

Executive summary

This method will be used to filter low resolution time-of-flight data (ToF).

Context and background knowledge

https://docs.mantidproject.org/v4.0.0/algorithms/RemoveLowResTOF-v1.html

(Note that the option using the Hodges criteria should not be implemented in this first version)

Inputs

Methodology

Follow Mantid's implementation.

Outputs

Scipp data array with low resolution ToF cropped or masked

Which interfaces are required?

Python module / function, Python script

Test cases

csv file of DREAM mantle already used in Scipp documentation (see https://scipp.github.io/tutorials/from-tabular-data-to-binned-data.html)

Comments

No response

SimonHeybrock commented 7 months ago

@celinedurniak Given that the Hodges criterion should not be implemented, what is there to do here? Isn't this equivalent to setting a minimum wavelength?

celinedurniak commented 7 months ago

Yes it is for this first implementation. What I'd like to have is a function with a intuitive name so that users can apply this correction without knowing too much about Scipp / Python. Or will it be handle in a different way with Sciline?

SimonHeybrock commented 7 months ago

There will be a workflow that encapsulates this. The user can then set the TOF or wavelength range (similar example: https://scipp.github.io/esssans/examples/zoom.html#Setup-reduction-parameters, setting WavelengthBins).

Questions:

celinedurniak commented 7 months ago

@SimonHeybrock Here are my answers to your questions. At the moment, I think

  1. this algorithm will used most of the time
  2. it is better to implement both: specifying ToF or wavelength
SimonHeybrock commented 7 months ago

Can you clarify if you mean that the Hodges criterion should be implemented? Or simply that we need to set bounds in ToF and wavelength? This is unclear from the current specification, since the Mantid algorithm uses the Hodges criterion when using ToF, as far as I can tell.

jl-wynen commented 6 months ago

@celinedurniak #44 has the option to crop ToF at the beginning of the workflow. It requires a manually-set parameter just like the POWGEN workflow: https://scipp.github.io/essdiffraction/examples/POWGEN_data_reduction.html#Define-reduction-parameters (ValidTofRange)

Is this sufficient? Or do we need to implement the Hodges criterion?

celinedurniak commented 6 months ago

@jl-wynen For the moment, the implementation of the Hodges criterion is not needed.

jl-wynen commented 6 months ago

Ok. Then I close this issue as completed.

jl-wynen commented 6 months ago

According to the PDF reduction documents shared by Celine (Mantid workflow), the step described here is performed after conversion to d-spacing and lorentz correction. There also is a separate 'crop in tof' step performed earlier after applying absorption corrections.

Found this in the part of the document that describes the basic powder reduction workflow. I'm reopening because we currently only have the latter.

SimonHeybrock commented 6 months ago

Can you elaborate why computing d-spacing or Lorentz correction matter? Neither should influence the TOF values, i.e., shouldn't the order of steps be irrelevant?

jl-wynen commented 6 months ago

@celinedurniak? I don't know. I'm assuming because those are needed to determine the resolution?