It's not, strictly, an error in the tutorial, but the explanation is probably missing, which makes it easy to make a mistake.
If you follow the tutorial exactly, step by step, the script is correct for reading the transmission spectrum of the 1 V bias calculation, stored in the same file as the zero bias calculation. Therefore the NC file will actually contain 2 transmission spectra, and so when you tell ATK you want to read the transmission spectra, as you do with
transmission_spectrum = nlread("LiH2.nc",TransmissionSpectrum)
it will return a list with 2 entries. The first one is [ 0 ] and the second is [ 1 ]. (I write indices with spaces; as you perhaps noticed [ 0 ] without spaces has a special meaning in BB code, used for markup on the Forum.)
In future versions we'll probably have some simple way to bring up the NC file in VNL, click on the TransmissionSpectrum entry (one of them), and say "calculate current". This will reduce the need for the user to write little pieces of code, but/and for those who still want to we can make some more explanatory tutorials.
A way to get around the indices, which are kind of arbitrary (just by order which they were put into the file), would be to refer to the transmission spectrum by
object_id which is a unique label for each quantity put into the NC file. An example:
# Zero bias calculation
...
transmission_spectrum = ...
nlsave("LiH2.nc",transmission_spectrum, object_id="zerobias")
# 1 V bias calculation
...
transmission_spectrum = ...
nlsave("LiH2.nc",transmission_spectrum, object_id="1Vbias")
This takes some of the guesswork out of it, so that when you want to restore the transmission spectrum, you would say
# Read 1 V transmission spectrum
transmission_spectrum = nlread("LiH2.nc",object_id="1Vbias")[0]
Now, you still need the [ 0 ] (at least for now, maybe not in the future, but we'll let you know in the manual about that!), but since the
object_id is unique, you never need [1] in this case.
Good luck and have fun with ATK!