def generate_diffraction_pattern(structure, *args): structure = self.from_data(structure) kwargs = self.reconstruct_kwargs_from_state() calculator = TEMCalculator(**kwargs) print("kwargs", kwargs) return dcc.Graph( figure=calculator.get_plot_2d(structure), responsive=False, config={ "displayModeBar": False, "displaylogo": False }, )
def test_get_plot_2d(self): c = TEMCalculator() structure = self.get_structure("Si") self.assertTrue(isinstance(c.get_plot_2d(structure), go.Figure))