Fixing peak position while using RG

Hi,

Is it possible to somehow fix the peak positions when refitting peaks with RG? It would be useful in cases where you know the peak positions from a spectrum with a shorter mixing and you have heavy overlap in a longer mixing spectrum.

Thank you,
Józef

At the moment not for group fitting (like a simulataneous fit of peaks in a multiplet). Can do for multiple singular peak fitting.
If interested in singular fitting can do these steps:

  • select peaks on display;

  • Open a macro editor: copy and paste

    with undoBlock():
        for peak in current.peaks:
            peak.fit(keepPosition=True)
    
  • save as: fitAtPosition.py

  • Play (green icon)

  • Optional, can link to a shortcut: Click on the 3Dots icon (“add macro to a shortcut”) and take a note of the newshortcut value , like Q0.
    Next time you select peaks, just use the shortcut to refit at position.