Author Topic: Exporting Density of States data  (Read 1092 times)

0 Members and 1 Guest are viewing this topic.

Offline vivek-dhande

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ca
  • Reputation: 0
    • View Profile
Exporting Density of States data
« on: January 14, 2023, 18:50 »
I have run a density of states like so and I would like to extract the raw data:

iv_characteristics.addProjectedLocalDensityOfStates(
    gate_source_voltages = back_gate_source_voltages,
    drain_source_voltages = drain_source_voltages,
    energies=numpy.linspace(-0.01, 0.035, 6000)*eV, # 10ueV steps
)

I opened the Projected Local Density of States plot and clicked on Export --> export data as text file, but I get an error:
Traceback (most recent call last):
  File "zipdir/NL/GUI/Graphics/Plotter/PlotView/PlotView.py", line 389, in save
  File "zipdir/NL/GUI/Graphics/Plotter/IO/Export.py", line 131, in writeTXT
  File "zipdir/NL/GUI/Graphics/Plotter/IO/Export.py", line 159, in _dataToTXT
  File "zipdir/NL/GUI/Graphics/Plotter/IO/Export.py", line 212, in _data1DtoTXT
NameError: name 'dataToTXT' is not defined

I'm not sure where and how I should define `dataToTXT` or fix this issue.

Thank you!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Exporting Density of States data
« Reply #1 on: January 18, 2023, 01:13 »
Which version of QuantumATK are you using?

Offline vivek-dhande

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ca
  • Reputation: 0
    • View Profile
Re: Exporting Density of States data
« Reply #2 on: February 22, 2023, 05:55 »
2019.12.980d1ca I'm pretty sure.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Exporting Density of States data
« Reply #3 on: February 28, 2023, 07:17 »
Ok, so that might have been a bug, but there is not much we can do to fix that now, 3 years later. You can either use a more recent version where most likely this bug is not present, or you will need to write a script to extract the data manually. This is not hard, but might require some experience with our data types. It's hard to provide a generic example since you are using the IVCharacteristics, but if you isolate the ProjectedLocalDensityOfStates object, it will have a .evaluate() method which basically returns an array, which you could export or print to the terminal to get the raw numbers.

I can advise but would need to see what the plot looks like in the GUI and what data files (hdf5) you are working with.