Reading the data

MagicTools can read data from several file types, used in MagiC: RDF and potential files *.rdf, *.pot and the MagiC core log-file magic.out. This is done by procedures: ReadRDF, ReadPot and ReadMagiC, respectively.

Example:

	import MagicTools as MT
	RDFs_ref=MT.ReadRDF('MT1MT2.rdf')
	Pots=MT.ReadPot('01.MT1MT2.i010.pot', quiet=True)
	RDFs_smpl=MT.ReadMagiC('01.magic.out', iters=(1,2,10))
	RDFs_smpl_mult = MT.ReadMagiC(['01.magic.out','02.magic.out'])
The first line imports the library, while the other lines are showing how to call the reading procedures. The procedures put the data into specified variables: RDFs_ref, Pots, RDFs_smpl. The first two variables are instances of DFset, and the third variable, resulting from reading MagiC core output is a list of DFsets, where every element of the list is a set of RDFs sampled while given iteration, as specified in parameter iters. The last line shows example of how to read results from several files. ReadMagiC, is not limited to reading just RDFs, but it can also extract potentials, corrected potentials, corrections applied at an iteration, reference RDFs. Check the procedure references for more details.