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

EDD fall 2023 #71

Open
14 of 20 tasks
keara-soloway opened this issue Aug 16, 2023 · 9 comments · Fixed by #76
Open
14 of 20 tasks

EDD fall 2023 #71

keara-soloway opened this issue Aug 16, 2023 · 9 comments · Fixed by #76
Labels
EDD For Energy Dispersive Diffraction

Comments

@keara-soloway
Copy link
Collaborator

keara-soloway commented Aug 16, 2023

Remaining tasks for the fall 2023 EDD workflow:

  • Add new Processor to refine lattice parameters.

StrainAnalysisProcessor & MCACeriaCalibrationProcessor:

  • select mask & HKLs for fitting in one interactive plot (not two separate ones).

DiffractionVolumeLengthProcessor:

  • Include text annotation on final plot: measured DVL
  • Include in results: parameters of the gaussian fit
  • Account for sample thickness

StrainAnalysisProcessor:

  • new interaction point: materials parameters (lattice params & space group) selection
  • allow for a variable tth angle to be used at each point in the map
  • show a flattened map (2d image) of all MCA data underneath the 1D reference spectrum shown when selecting HKLs for fitting
  • indicate the mask used for calibration when selecting the mask to use for strain analysis
  • place fit metadata, results, residuals, chisq values, etc in to the structure returned by get_nxroot. Include: goodness of fit value (redchi), success / failure flag.
  • include extra dataset in resulting nexus structure: map of integral of each MCA spectrum
  • outstanding question for CB, PK, KN: how to handle "jagged" maps or data taken at duplicate coordinates from input par files?
  • Generate plot: resulting strains
  • Generate plots: raw data & best fit at each map point
  • Fix bug: Material name in GUI for selecting material parameters is always "Ni"
  • Fix bug: in the returned nexus structure, initial guesses for centers on the unconstrained fits are not being recorded properly (uniform fits are okay, though)
  • Indicate that the microstrains are calculated from the unconstrained fits in the resulting nexus structure
  • Be more specific about what the reference spectrum shown is in the mask & HKL selection window
  • (non-urgent) add option to click on a location on the y-axis on the lower 2D reference map & make that the reference spectrum shown on the upper 1D plot
  • zero-pad the frame_n.png filenames
@keara-soloway keara-soloway added the EDD For Energy Dispersive Diffraction label Aug 16, 2023
@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 16, 2023

Needed for allowing variable tth angles in StrainAnalysisProcessor, and for using uniform fit values as initial guesses for the unconstrained fit:

  • FitMap.create_multipeak_model should be able to accept a list of maps of values for centers (whereas Fit.create_multipeak_model would still expect a list of scalars)

@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 17, 2023

For the variable tth angle: specify the name of a numpy file under each item in edd.StrainAnalysisProcessor -> config -> detectors. Numpy file should contain a 1D array of values with the same length as the good scan numbers in the par_file provided under edd.StrainAnalysisProcessor -> config. Variable tth angles won't be allowed if map_config was provided instead of par_file.

@keara-soloway keara-soloway linked a pull request Aug 23, 2023 that will close this issue
@keara-soloway keara-soloway reopened this Aug 23, 2023
@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 25, 2023

Needed for allowing variable tth angles in StrainAnalysisProcessor, and for using uniform fit values as initial guesses for the unconstrained fit:

  • FitMap.create_multipeak_model should be able to accept a list of maps of values for centers (whereas Fit.create_multipeak_model would still expect a list of scalars)
  • Variable tth angles can be left out of determining guesses for peak centers on the uniform fit (just use them for the strain calculation after the fit has been done).
  • The unconstrained fit can now use the map of uniform fit results as initial guesses.

@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 30, 2023

Ask CB, PK, KN: should max energy be included in detector in energies?

RV: Resolved.

@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 30, 2023

MCADataProcessor needs debugging if CB, PK, KN want it.

RV: Wait until we can discuss this with CB, PK, KN.

@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Aug 30, 2023

Inefficiencies to address:

  • Reduce the number of calls to edd.utils.get_unique_hkls_ds in edd.MCACeriaCalibrationProcessor and edd.StrainAnalysisProcessor (as part of this: the signature of many functions in edd.utils should change, too)
  • Reduce number of times MCA data is read in edd.StrainAnalysisProcessor
  • edd.utils.select_material_params is pretty slow to respond with redrawing the plot when it needs to

RV: I don't know if the third item is still current for KS, it seems that it's not responding slower than I expect to when running from home. At work it runs fast.

@rolfverberg
Copy link
Collaborator

rolfverberg commented Aug 30, 2023

Add a reset button to the select hkl and data interactive bit to discard all currently selected span's

RV: Done

@keara-soloway
Copy link
Collaborator Author

As each point in the fit map completes, do in parallel:

  • compute the strain from the results at that point
  • show the strain in a live matplotlib figure of strains
  • show the fit in the matpltlib animation
  • write results to the nexus structure

@keara-soloway
Copy link
Collaborator Author

keara-soloway commented Jan 11, 2024

Feedback from 2024-01-10:

  • include_bin_ranges -> include_energy_ranges
  • In all cases where a mask for MCA data needs to be selected: set the default value for include_energy_ranges to be [[50,150]].
  • Add text showing the following quantities to the ceo2 calibration "final report figure": tuned tth value and channel energy linear correction parameters.
  • Hard code the x-axis label in the dvl measurement "final report figure" to be "Beam Direction".
  • In interactive lattice parameter selection and fitting mask/HKL selection: the reference spectrum plotted should be the sum of all spectra in the map. Make sure this is the case, and that is indicated in the legend of the reference plot.
  • In interactive mask/HKL selection with a map of reference spectra shown below the interactive 1D plot: automatically update the colorbar range to be the min/max values of only the data selected to be included in the fit.
  • When interactively selecting mask & HKLs and there is a map of reference spectra shown below the 1D reference spectrum:
    • Add ability to interactively select a specific spectrum from the map to use as the plotted 1D reference spectrum.
    • Add ability for user to manually set colorbar ranges for the map of reference spectra.
  • New Processor request: tool to interactively visualize an arbitrary NXdata object. The goal: something that essentially reproduces the plot pane and axis panels in the nexpy GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EDD For Energy Dispersive Diffraction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants