====== Print ====== ### For a spectrum object //G//, //G.Print()// prints the spectra G. Generally //print(G)// is preferred over //G.Print()//. //G.Print()// is more memory efficient and therefore useful for large objects. //G.Print()// returns nill and prints the spectra to standard output. Options can be specified if you want to print to file. ### ===== Options ===== ### //psi.Print()// accepts options. Several options are specified as a list //{}// of single options. A single option is given as a list of //name// and //value//, //{"name",value}//. ### ==== "File" ==== ### "File" of type string: A string specifying the file name to which the wavefunction is printed (over writing the old file) ### ===== Example ===== ### The following example creates the spectra as defined in the [[documentation:language_reference:objects:spectra:start|definitions.Quanty]] file on a very coarse mesh in order to reduce the printout. It then prints the spectrum to screen using two different methods. ### ==== Input ==== dofile("definitions.Quanty") G = CreateSpectra(H, T1, psi, {{"Emin",-1}, {"Emax",11}, {"NE",12}}) print(G) G.Print() ==== Result ==== #Spectra: 1 Emin______Emax -1.000000000000000E+00 1.100000000000000E+01 EminPole__EmaxPole -1.495068096205157E+00 9.000000000000002E+00 dE________Gamma 1.000000000000000E+00 1.000000000000000E+01 Energy Re[0] Im[0] -1.000000000000E+00 -2.508283391922123E-01 -1.695149973642449E-01 0.000000000000E+00 -2.597570308526458E-01 -2.033460260658194E-01 1.000000000000E+00 -2.637994996675092E-01 -2.441395613613737E-01 2.000000000000E+00 -2.598646218782206E-01 -2.916728671572367E-01 3.000000000000E+00 -2.444088238319901E-01 -3.443798413229499E-01 4.000000000000E+00 -2.140147772378020E-01 -3.989283248785057E-01 5.000000000000E+00 -1.662684715472524E-01 -4.500000000000001E-01 6.000000000000E+00 -1.009611902469467E-01 -4.904697167474095E-01 7.000000000000E+00 -2.150817900332432E-02 -5.123910066492987E-01 8.000000000000E+00 6.406884570163136E-02 -5.093002307218114E-01 9.000000000000E+00 1.440985570531243E-01 -4.796302126820893E-01 1.000000000000E+01 2.073448031787857E-01 -4.289900452131248E-01 1.100000000000E+01 2.481489483746971E-01 -3.681745033512026E-01 #Spectra: 1 Emin______Emax -1.000000000000000E+00 1.100000000000000E+01 EminPole__EmaxPole -1.495068096205157E+00 9.000000000000002E+00 dE________Gamma 1.000000000000000E+00 1.000000000000000E+01 Energy Re[0] Im[0] -1.000000000000E+00 -2.508283391922123E-01 -1.695149973642449E-01 0.000000000000E+00 -2.597570308526458E-01 -2.033460260658194E-01 1.000000000000E+00 -2.637994996675092E-01 -2.441395613613737E-01 2.000000000000E+00 -2.598646218782206E-01 -2.916728671572367E-01 3.000000000000E+00 -2.444088238319901E-01 -3.443798413229499E-01 4.000000000000E+00 -2.140147772378020E-01 -3.989283248785057E-01 5.000000000000E+00 -1.662684715472524E-01 -4.500000000000001E-01 6.000000000000E+00 -1.009611902469467E-01 -4.904697167474095E-01 7.000000000000E+00 -2.150817900332432E-02 -5.123910066492987E-01 8.000000000000E+00 6.406884570163136E-02 -5.093002307218114E-01 9.000000000000E+00 1.440985570531243E-01 -4.796302126820893E-01 1.000000000000E+01 2.073448031787857E-01 -4.289900452131248E-01 1.100000000000E+01 2.481489483746971E-01 -3.681745033512026E-01 ===== Available functions ===== {{indexmenu>../functions/#1}} ===== Available methods ===== {{indexmenu>.#1}}