Almost - the carrier density is computed based on the configuration, not the transmission. The script will be simple:
conf = nlread("my_nc_file.nc", DeviceConfiguration, object_id="gID000")[-1]
ed = ElectronDensity(conf)
nlsave("ed.nc", ed)
Note that your NC file might contain several DeviceConfigurations - you should keep track of which one is which with the help of the object_id which you can see in VNL. Also, here I save the density in a seprate NC file, but you can put it inside the same file too of course.