Author Topic: Compare Data  (Read 4293 times)

0 Members and 1 Guest are viewing this topic.

Offline Nayab Shiraz

  • Heavy QuantumATK user
  • ***
  • Posts: 51
  • Country: us
  • Reputation: 0
    • View Profile
Compare Data
« on: February 28, 2020, 21:12 »
While comparing two or more transmission spectra using 'compare data' it only shows the sum curve. Is there a way to compare transmission spectra of just spin up or spin down curves?

Offline Nayab Shiraz

  • Heavy QuantumATK user
  • ***
  • Posts: 51
  • Country: us
  • Reputation: 0
    • View Profile
Re: Compare Data
« Reply #1 on: March 23, 2020, 23:43 »
Please can someone help me with this?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Compare Data
« Reply #2 on: April 21, 2020, 00:44 »
The tool is designed as a quick way for "standard" comparison. I agree it could be nice to extend it in the future with various options, but for now it only supports the sum (for simplicity, basically). If you want to plot spin up/down curves together you will have to write a small Python script, it's really simple.

Assuming the transmission spectra are in separate files:

t1 = nlread("file1.hdf5", TransmissionSpectrum)[0]
t2 = nlread("file2.hdf5", TransmissionSpectrum)[0]
import pylab
pylab.plot(t1.evaluate(spin=Spin.Up), t1.energies(), label="File1, Spin Up")
pylab.plot(t2.evaluate(spin=Spin.Up), t2.energies(), label="File2, Spin Up")
pylab.legend()
pylab.xlabel("Transmission")
pylab.ylabel("Energy / eV")

With small modifications you can compare spin up vs down from the same file, etc.