Transferring assignments to referenced spectra

Hi Kirsten,

that is what I was going to recommend, too.

If you have lots of spectra you could do it with a little macro like this for each spectrum:

get('SP:hsqc_old').referenceValues = get('SP:hsqc_new').referenceValues

If the referencing Points have changed, too, then you’ll also need an equivalent line like this:

get('SP:hsqc_old').referencePoints = get('SP:hsqc_new').referencePoint

And if you have systematically renamed your spectra (e.g. the new spectra have the same names as the old ones, but with _new at the end) you could wrap it all in a bit more Python to do everything in one go:

for sp1 in project.spectra:
    for sp2 in project.spectra:
        if sp2.name == sp1.name + '_new':
            sp1.referenceValues = sp2.referenceValues
            sp1.referencePoints = sp2.referencePoints

Vicky