Author Topic: Editing Transmission Plot  (Read 501 times)

0 Members and 1 Guest are viewing this topic.

Offline paullapham95

  • New ATK user
  • *
  • Posts: 5
  • Country: gb
  • Reputation: 0
    • View Profile
Editing Transmission Plot
« on: January 7, 2021, 13:15 »
Hello,
Is there a simple way for me to make T(E) the Y axis and E(eV) the X axis for Transmission spectra in Quantum ATK?
I have found plenty information in editing plots in Quantum ATK, however none seem to apply to transmission spectra plots.
Is there any way I can swap the X and Y values on the Transmission plots or do I have to extract the data and plot it myself?
Kind regards,

Paul

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 1286
  • Country: dk
  • Reputation: 24
    • View Profile
Re: Editing Transmission Plot
« Reply #1 on: January 7, 2021, 16:17 »
Unfortunately, you have to export transmission spectrum data in xy-format (right-click on the plot and then export data) and replot it. In fact, you can still do it in QuantumATK, writing a plotting script using pyplot, https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.html, or similar, and then submit it to the Job Manager or execute it from the command line: atkpython plotting_script.py.
« Last Edit: January 8, 2021, 11:19 by Petr Khomyakov »

Offline paullapham95

  • New ATK user
  • *
  • Posts: 5
  • Country: gb
  • Reputation: 0
    • View Profile
Re: Editing Transmission Plot
« Reply #2 on: January 7, 2021, 17:26 »
Thank you  :)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5012
  • Country: dk
  • Reputation: 85
    • View Profile
    • QuantumATK at Synopsys
Re: Editing Transmission Plot
« Reply #3 on: January 13, 2021, 19:52 »
As Petr noted, you don't really need to go through the GUI for this. A very simple example script would be
Code
trans = nlread("file.hdf5", TransmissionSpectrum)[-1]
import pylab as P
e = trans.energies()
t = trans.evaluate(spin=Spin.Up)
P.plot(e,tr)
P.savefig("plot.png")
Then of course all the xlabel/ylabel and so on... :-)