Lifting the magnetic field in spinpolarization

Topics related to Spinach package
Post Reply
NMR-trainee
Posts: 12
Joined: Tue May 24, 2022 6:32 am

Lifting the magnetic field in spinpolarization

Post by NMR-trainee »

Hello professor Kuprov.

My questions are related to spin polarization graphs and lifting the magnetic field in this experiment.

I have found your example code file named "sabre_pyridine", and in it you lift the magnetic field within the experiment. I was wondering if you could give me insight into why my code runs but gives much too small matrices, or give me another way to lift the magnetic field.

My simulation situation is similar to the example situation. Proton 1 is hyperpolarized and then the system is put for 10 seconds in 6.5mT field, then raised to 9.4T field with some gradient and then kept in the high field for a second. For this I have been using your "1024 steps over 5 seconds", for experimenting. But the sabre_pyridine code did not make spinpolarization graphs and I guess my problem comes with me having "'multichannel" and multiple coils in evolution.

I have attached the end of the code as a picture. Above the picture is just specified the 5 proton spin system and their J-couplins and zeeman scalars. And set polarization field to 6.5mT and nmr_field to 9.4T. The picture also shows my error message. If I change the first multichannel into "final" I get 1-by-2 matrices for answerOH, answerHa and the rest.

So how can I do spinpolarization with a changing magnetic field?

Thank you!
Attachments
The code
The code
spinevolution.PNG (405.63 KiB) Viewed 507 times
kuprov
Posts: 111
Joined: Mon Mar 29, 2021 4:26 pm

Re: Lifting the magnetic field in spinpolarization

Post by kuprov »

In line 72, the call to evolution is incorrect - 'multichannel' will return an observable array, but what you probably want to get there is the final state. Replace 'multichannel' by 'final'.
NMR-trainee
Posts: 12
Joined: Tue May 24, 2022 6:32 am

Re: Lifting the magnetic field in spinpolarization

Post by NMR-trainee »

Thank you, the code ran further this time. But now the vectors for each of the spins time dynamics are too short. The 'answer' variable is a 5x2 complex double, meaning that the answerOH and the rest are 1x2 complex doubles.

How can I get the proper time dynamics vectors with much more data entries?
kuprov
Posts: 111
Joined: Mon Mar 29, 2021 4:26 pm

Re: Lifting the magnetic field in spinpolarization

Post by kuprov »

In line 87, you need different parameters. At the moment, you are asking Spinach take just one time step.
NMR-trainee
Posts: 12
Joined: Tue May 24, 2022 6:32 am

Re: Lifting the magnetic field in spinpolarization

Post by NMR-trainee »

Now it works, thanks!

But one more question. How can I get the time dynamics of the system during the time when I lift the magnetic field? Can I use hdot.m or some other command to calculate the time dynamics inside the for loop?
kuprov
Posts: 111
Joined: Mon Mar 29, 2021 4:26 pm

Re: Lifting the magnetic field in spinpolarization

Post by kuprov »

Just keep all intermediate rho vectors in the loop in Line 79. Then yes, take scalar products with observables of interest.
Post Reply