def calculator_test(): """ Test the calculator(s) """ # instantiate default Calculator object # and define initial state calc = Calculator(structure=dna, wavelength=1.2) # calculate XRD for the structure, using defined engine #data_out = calc.calculateXRD(structure=diamond, engine="ASE") # calculate XRD for the structure, using default engine data_out = calc.calculateXRD() # create a chart object chart = Chart() # add powder data to the chart. This needs to be made such that # setData doesn't need a type (setData1D/setDataCrystal) but rather # gets set depending on the type of the argument passed chart.setData1D(data_out) # create MPL representation of the Chart object #mpl_chart = chart.getMplChart() #mpl_chart.show() # or just show it directly chart.show()