Skip to content

Refactor i10 Powder Diffraction Data Reduction for Production #1

@Relm-Arrowny

Description

@Relm-Arrowny

Since the publication of our powder diffraction paper, there has been a significant increase in demand for beam time on i10. However, because the original data analysis relied on ad hoc scripts that are no longer functional, it is essential to update our data reduction software. Making the software production-ready will ensure it is accessible and reliable for a broader range of users.

Goals

Acceptance criteria : What journeys should the user be able to complete to consider your feature done
Be as specific as you can, check them off once they work. Add more if you find more requirements during development. Issue should only be considered done after all of them are checked

  • Remove Hardcoded Paths: Replace all C:\Users\wvx67826\... strings with dynamic path handling (using argparse or pathlib).
  • Update Dependencies: Ensure compatibility with modern pyFAI ($2024.x+$) and Python 3.10+.
  • Environment Spec: Provide a requirements.txt or environment.yml for one-click setup.

2. Data Robustness

  • Improved Regex Parsing: Replace fragile split("=") logic with a robust regex to extract tth (theta) values from varied filenames.
  • Batch Processing: Enable the user to process a directory of TIFF images in a single loop.
  • Input Validation: Implement check for existence of .poni and .TIFF files before execution starts.

3. Integration & Calibration

  • Refinement Module: Encapsulate GoniometerRefinement into a reusable function/class.
  • Standardized Export: Support data export to .xy formats for Rietveld refinement compatibility.
  • Metadata Logging: Automatically save a JSON log of the parameters used (dist, poni, wavelength) for every run.

4. Documentation

  • README: Add a brief guide on how to run the script via Command Line.
  • Example Data: Include a small "test" folder with 1-2 images to verify the pipeline.

Tasks

base on the goals, deduce the tasks required. check them off once they're done

  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [ ]

Related Resources

  • Legacy Dependencies: pyFAI 0.19.0, fabio, matplotlib.
  • Old script

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions