fusion-energy / openmc_geometry_plot

Create axis slice plots of OpenMC geomtry with specified zoom
6 stars 0 forks source link

user input total pixels #11

Closed shimwell closed 1 year ago

shimwell commented 1 year ago

the pixels across and pixels up can be found from total pixels.

    plot_width = abs(plot_left - plot_right)
    plot_height = abs(plot_bottom - plot_top)

    aspect_ratio = plot_height / plot_width

    import math
    pixels_across = int(math.sqrt(pixels / aspect_ratio))
    pixels_up = int(pixels_across * aspect_ratio)

However this results in contour diagrams not quite lining up with the pixels

Screenshot from 2023-02-15 18-02-48

shimwell commented 1 year ago

after some though I'm not going to implement this