Python SNOPO diagram script
parent
0806cedb9e
commit
20db65fda1
|
@ -0,0 +1,113 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import graphviz
|
||||
|
||||
g = graphviz.Digraph(
|
||||
name="SatNOGS Optical",
|
||||
comment="Process Graph",
|
||||
filename="so-process",
|
||||
directory="tmp",
|
||||
engine="dot",
|
||||
renderer="cairo",
|
||||
formatter="cairo",
|
||||
graph_attr="",
|
||||
node_attr="",
|
||||
edge_attr="",
|
||||
)
|
||||
g.attr(rankdir="LR")
|
||||
g.attr(bgcolor='white:white', label='DRAFT SatNOGS Optical Process Overview DRAFT', fontcolor='black')
|
||||
|
||||
with g.subgraph(name="cluster_hardware") as a:
|
||||
a.attr(style="filled", color="lightgrey")
|
||||
a.node_attr.update(style="filled", color="pink", shape="rectangle")
|
||||
with a.subgraph(name="cluster_video") as b:
|
||||
b.attr(style="filled", color="lightgreen", label="Motion Video Cameras")
|
||||
b.edge("UVC", "Video")
|
||||
b.edge("OpenCV", "Video")
|
||||
b.edge("Raspberry Pi", "Video")
|
||||
b.edge("ZWO ASI", "Video")
|
||||
with a.subgraph(name="cluster_camera") as c:
|
||||
c.attr(style="filled", color="lightgreen", label="Still Cameras")
|
||||
c.edge("gphoto2", "Camera")
|
||||
c.edge("Canon DSLR", "Camera")
|
||||
c.edge("Nikon DSLR", "Camera")
|
||||
c.edge("INDI", "Camera")
|
||||
a.attr(label="Hardware\nChoose One")
|
||||
|
||||
with g.subgraph(name="cluster_repository") as a:
|
||||
a.attr(style="filled", color="lightgreen", label="foooo")
|
||||
with a.subgraph(name="cluster_camera_software") as b:
|
||||
b.attr(color="lightblue")
|
||||
b.node_attr["style"] = "filled"
|
||||
b.edge("Video", "stvid")
|
||||
b.edge("Camera", "stphot")
|
||||
b.attr(label="Development\nPython")
|
||||
with a.subgraph(name="cluster_c_software") as c:
|
||||
c.attr(color="blue")
|
||||
c.node_attr["style"] = "filled"
|
||||
c.edge("Video", "sattools")
|
||||
c.edge("Camera", "sattools")
|
||||
c.attr(label="Legacy\nC")
|
||||
a.attr(label="Software\nRepository\nChoose One")
|
||||
|
||||
with g.subgraph(name="cluster_acquire") as a:
|
||||
a.attr(style="filled", color="pink", label="foooo")
|
||||
with a.subgraph(name="cluster_camera_acquire") as b:
|
||||
b.attr(color="lightblue")
|
||||
b.node_attr["style"] = "filled"
|
||||
b.edge("sattools", "sattools/cam-get.sh")
|
||||
b.edge("stphot", "stphot/acquire.py")
|
||||
b.attr(label="Camera\nSample")
|
||||
with a.subgraph(name="cluster_video_acquire") as c:
|
||||
c.attr(color="blue")
|
||||
c.node_attr["style"] = "filled"
|
||||
c.edge("stvid", "stvid/acquire.py")
|
||||
c.edge("sattools", "sattools/vid-get.sh")
|
||||
c.attr(label="Video\nSample")
|
||||
a.attr(label="Acquire Sample")
|
||||
|
||||
|
||||
with g.subgraph(name="cluster_platesolver") as a:
|
||||
a.attr(style="filled", color="tan", label="foooo")
|
||||
with a.subgraph(name="cluster_camera_plate_solver") as b:
|
||||
b.attr(color="lightblue")
|
||||
b.node_attr["style"] = "filled"
|
||||
b.edge("sattools/cam-get.sh", "sattools/cam-find.sh")
|
||||
b.edge("stphot/acquire.py", "stphot/ABC.py")
|
||||
b.attr(label="Camera\nPlate Solver")
|
||||
with a.subgraph(name="cluster_video_platesolver") as c:
|
||||
c.attr(color="blue")
|
||||
c.node_attr["style"] = "filled"
|
||||
c.edge("sattools/vid-get.sh", "sattools/vid-find.sh")
|
||||
c.edge("stvid/acquire.py", "stvid/ABC.py")
|
||||
c.attr(label="Video\nPlate Solver")
|
||||
a.attr(label="Plate Solver")
|
||||
|
||||
with g.subgraph(name="cluster_satid") as a:
|
||||
a.attr(style="filled", color="lightblue", label="satid")
|
||||
with a.subgraph(name="cluster_camera_satid") as b:
|
||||
b.attr(color="tan")
|
||||
b.node_attr["style"] = "filled"
|
||||
b.edge("sattools/cam-find.sh", "sattools/cam-id.sh")
|
||||
b.edge("stphot/ABC.py", "stphot/xyz.py")
|
||||
b.attr(label="Camera\nID Satellite")
|
||||
with a.subgraph(name="cluster_video_platesolver") as c:
|
||||
c.attr(color="tan")
|
||||
c.node_attr["style"] = "filled"
|
||||
c.edge("sattools/vid-find.sh", "sattools/vid-id.sh")
|
||||
c.edge("stvid/ABC.py", "stvid/xyz.py")
|
||||
c.attr(label="Video\nID Satellite")
|
||||
a.attr(label="Identify Satellites")
|
||||
|
||||
g.attr("node", shape="doublecircle", style="filled", color="orange")
|
||||
g.edge("Start\nHere", "INDI")
|
||||
g.edge("Start\nHere", "gphoto2")
|
||||
g.edge("Start\nHere", "Canon DSLR")
|
||||
g.edge("Start\nHere", "Nikon DSLR")
|
||||
g.edge("Start\nHere", "ZWO ASI")
|
||||
g.edge("Start\nHere", "Raspberry Pi")
|
||||
g.edge("Start\nHere", "OpenCV")
|
||||
g.edge("Start\nHere", "UVC")
|
||||
g.attr("node", shape="rectangle", style="filled", color="grey")
|
||||
|
||||
g.render(view=False, format="png")
|
Loading…
Reference in New Issue