Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectrum Export for RITS: Export RITS format from Spectrrum Viewer #1931

Closed
22 of 25 tasks
JackEAllen opened this issue Sep 20, 2023 · 1 comment
Closed
22 of 25 tasks
Labels
EPIC EPIC Issues with epic names Type: Improvement

Comments

@JackEAllen
Copy link
Collaborator

JackEAllen commented Sep 20, 2023

Description

As a: IMAT user and external user

I want to: export data within Mantid Imaging from the Spectrum Viewer in a .dat and maybe .inp

For: a given dataset opened within the live viewer where the spectrum is of importance for Bragg edge imaging at IMAT.

So that: I can import my spectrum data created within the Mantid Imaging Spectrum Viewer into the RITS software, providing a smooth user experience, with more flexibility for IMAT to work with all cameras used at IMAT.

Unlike: the current solution which is to use ImageJ and Fortran scripts which is a big obstacle for users, and IMAT does not have the expertise to provide support and only works with a limited number of IMATs camera's.

Our solution is: to add a new file export method to Mantid Imaging core that can write spectrum data in a RITS format to .dat files which will be connected to a new front end widget accessible though the Spectrum Viewer within Mantid Imaging.

Acceptance criteria

  • A user can open a new widget within the spectrum viewer to export a spectrum to a RITS compatible format.
  • Provide simple control of a selected region and binning/averaging options.
  • Export a .dat file in a RITS compatible format
  • Import spectrum viewer exported .dat file into RITS software

Minimum Viable Project

  • Export .dat RITS file format
  • Exported data is full field
  • Exported data has fixed binning
  • ToF values from metadata used

Features in Scope

  • Exporting file format that can be read by RITS
  • Region selection
  • Binning / averaging options (running average, Gaussian kernel) in space and time
  • Handle metadata with image index to tof/wavelengths
  • Value in error column (Need more info)

Optionally note things out of scope (e.g. to clarify where there might be assumptions):

  • Compression or more efficient data format
  • Loading ToF data formats (will be separate epic)
  • Importing RITS Data

Enabling Conditions

What needs to be in place before this issue can be worked on?

  • Access to RITS software and Example RITS datasets.

Business Outcome Hypothesis

What is the expected outcome of this issue?
The current manual process is complex and time consuming. Users also lack the specialisms to provide support converting to the RITS format manually which could lead to errors in the converted data.
Users are therefore potentially unlikely to use IMAT as a preferred instrument if wishing to to perform Braggs edge imaging analysis with RITS software.
An incorporated solution within Mantid Imaging to easily export to the RITS format would save user time and require no technical specialist knowledge. Users will be less hesitant to to use IMAT for collecting data for Braggs edge analyse using RITS.

Improved user experience on IMAT that is more professional offering compatibility with RITS software.
Users more likely to come back.

Leading Indicators

What are the metrics that will indicate that we are on track to achieve the expected outcome?

  • Export something small (maybe a single pixel) into a format that can be successfully opened with RITS.
  • Progress on user controls and interface.

Non-functional Requirements (NFRs)

What are the NFRs for this issue?

  • Properly handle large data sizes (datasets close to RAM size). Don’t hit RAM limits, handle running out of disk space. If MI can currently load the dataset size on a given machine, it should be able to export it.
  • Simple and obvious to use. Can be used without requesting help. Well documented.
  • Unit and system tests.
  • Uses existing logging system.

Additional Information

Data format (.dat):
The three columns represent: "TOF [us]" , "transmission", "error_transmission"

  10002.5  	0.586763382  	0.00243263412 

  10007.5  	0.586680591  	0.00243047578 

  10012.5  	0.586723506  	0.00243261573 

  10017.5  	0.58880502  	0.00243376778 

  10022.5  	0.587584198  	0.00243149372 

  10027.5  	0.58731705  	0.00243247184 

  10032.5  	0.588038743  	0.00242969347 

  10037.5  	0.586632073  	0.00243069278 

Etc 

Broken Down Task to Accomplish this:

@JackEAllen
Copy link
Collaborator Author

I'll try and catchup with EXP Controls to discuss file compression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPIC EPIC Issues with epic names Type: Improvement
Projects
None yet
Development

No branches or pull requests

1 participant