I am trying to use dnp_freq_scan.m knowing nothing about how to use matlab or spinach...
I do know the microwave power I want to use in the simulation, but I have no idea what I would even put for the other parameters or how to put them into matlab.
I open matlab, activate spinach, and tried to start with "spin_system=create(sys,inter);" because that's what it says you have to do first in the documentation but I'm getting "unrecognized function or variable sys"
I'm planning to learn how to use matlab soon, but can anyone walk me through the basics I need to know for this one simulation?
DNP Simulation for a complete beginner
Re: DNP Simulation for a complete beginner
Two places. The lecture courses here:
https://spindynamics.org/group/?page_id=18 (Undergrad Magnetic Resonance, followed by Modules I and II of Spin Dynamics).
Then Matlab getting started tutorials here:
https://uk.mathworks.com/help/matlab/ge ... atlab.html
Then you are kinda ready. Give it a month or so - DNP is not for the faint of heart.
https://spindynamics.org/group/?page_id=18 (Undergrad Magnetic Resonance, followed by Modules I and II of Spin Dynamics).
Then Matlab getting started tutorials here:
https://uk.mathworks.com/help/matlab/ge ... atlab.html
Then you are kinda ready. Give it a month or so - DNP is not for the faint of heart.
Re: DNP Simulation for a complete beginner
Almost exactly a month later...What do I need to change to see both the positive and negative enhancement peaks on a single nucleus when using solid_effect_freq_scan_2? Thanks!
Re: DNP Simulation for a complete beginner
Nothing, both signs should come out automatically. In fact, in that example, they do.
Re: DNP Simulation for a complete beginner
Sorry, I meant how can I plot the negative & positive enhancements on the same axes instead of having them in two different plots/panels?
Re: DNP Simulation for a complete beginner
Ah, remove the subplot commands and insert "hold on" after the first plot is done. All other plots would then go into the same picture. The frequency scan is done in patches there to save simulation time - the rest of the range is empty.
Re: DNP Simulation for a complete beginner
Thanks for your help. Why do the proton and N-15 enhancements occur at the same frequency? Wouldn't they be at different frequencies since the Larmor frequencies of the nuclei are different?
Re: DNP Simulation for a complete beginner
The picture uses rotating frame, so relative frequencies to the Larmor frequency of the electron or the nucleus, depending on what is plotted.
Re: DNP Simulation for a complete beginner
Thanks. What would I need to change to use an anisotropic g factor with values of gxx, gyy, and gzz in the simulation instead of an isotropic single value for g? Is this possible?
Last edited by apple52 on Wed Jan 24, 2024 9:04 am, edited 1 time in total.
Re: DNP Simulation for a complete beginner
Of course, specify g-tensor as eigenvalues and Euler angles as described here:
https://spindynamics.org/wiki/index.php ... cification
and then get the Hamiltonian at a specified orientation as described here:
https://spindynamics.org/wiki/index.php ... entation.m
Then feed that Hamiltonian into the simulation.
https://spindynamics.org/wiki/index.php ... cification
and then get the Hamiltonian at a specified orientation as described here:
https://spindynamics.org/wiki/index.php ... entation.m
Then feed that Hamiltonian into the simulation.